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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
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
Show 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
import
os
import
re
import
shutil
import
stat
import
tarfile
import
tempfile
import
unittest
...
...
@@ -29,11 +30,12 @@ class NonInformativeTests(unittest.TestCase):
def
tearDown
(
self
):
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
)
fh
=
open
(
path
,
'w'
)
fh
.
write
(
contents
)
fh
.
close
()
os
.
chmod
(
path
,
mode
)
return
path
def
make_recipe
(
self
,
buildout
,
name
,
options
):
...
...
@@ -108,9 +110,9 @@ class NonInformativeTests(unittest.TestCase):
temp_directory
=
tempfile
.
mkdtemp
(
dir
=
self
.
dir
,
prefix
=
"fake_package"
)
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'
)
self
.
write_file
(
makefile_path
,
'exit -1'
)
self
.
write_file
(
makefile_path
,
'
all:
\
n
\
t
exit -1'
)
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