Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.cmmi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Dmitry Blinov
slapos.recipe.cmmi
Commits
5a55d45e
Commit
5a55d45e
authored
Jul 21, 2010
by
Kai Lautaportti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicitly set file access bits in tests.
parent
f32735bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
hexagonit/recipe/cmmi/tests.py
hexagonit/recipe/cmmi/tests.py
+5
-3
No files found.
hexagonit/recipe/cmmi/tests.py
View file @
5a55d45e
...
@@ -5,6 +5,7 @@ import errno
...
@@ -5,6 +5,7 @@ import errno
import
os
import
os
import
re
import
re
import
shutil
import
shutil
import
stat
import
tarfile
import
tarfile
import
tempfile
import
tempfile
import
unittest
import
unittest
...
@@ -29,11 +30,12 @@ class NonInformativeTests(unittest.TestCase):
...
@@ -29,11 +30,12 @@ class NonInformativeTests(unittest.TestCase):
def
tearDown
(
self
):
def
tearDown
(
self
):
shutil
.
rmtree
(
self
.
dir
)
shutil
.
rmtree
(
self
.
dir
)
def
write_file
(
self
,
filename
,
contents
):
def
write_file
(
self
,
filename
,
contents
,
mode
=
stat
.
S_IREAD
|
stat
.
S_IWUSR
):
path
=
os
.
path
.
join
(
self
.
dir
,
filename
)
path
=
os
.
path
.
join
(
self
.
dir
,
filename
)
fh
=
open
(
path
,
'w'
)
fh
=
open
(
path
,
'w'
)
fh
.
write
(
contents
)
fh
.
write
(
contents
)
fh
.
close
()
fh
.
close
()
os
.
chmod
(
path
,
mode
)
return
path
return
path
def
make_recipe
(
self
,
buildout
,
name
,
options
):
def
make_recipe
(
self
,
buildout
,
name
,
options
):
...
@@ -108,9 +110,9 @@ class NonInformativeTests(unittest.TestCase):
...
@@ -108,9 +110,9 @@ class NonInformativeTests(unittest.TestCase):
temp_directory
=
tempfile
.
mkdtemp
(
dir
=
self
.
dir
,
prefix
=
"fake_package"
)
temp_directory
=
tempfile
.
mkdtemp
(
dir
=
self
.
dir
,
prefix
=
"fake_package"
)
configure_path
=
os
.
path
.
join
(
temp_directory
,
'configure'
)
configure_path
=
os
.
path
.
join
(
temp_directory
,
'configure'
)
self
.
write_file
(
configure_path
,
'exit 0'
)
self
.
write_file
(
configure_path
,
'exit 0'
,
mode
=
stat
.
S_IRWXU
)
makefile_path
=
os
.
path
.
join
(
temp_directory
,
'Makefile'
)
makefile_path
=
os
.
path
.
join
(
temp_directory
,
'Makefile'
)
self
.
write_file
(
makefile_path
,
'exit -1'
)
self
.
write_file
(
makefile_path
,
'
all:
\
n
\
t
exit -1'
)
os
.
chdir
(
temp_directory
)
os
.
chdir
(
temp_directory
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment