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
f1d327b2
Commit
f1d327b2
authored
Jun 19, 2013
by
Thomas Larrieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work in progress. Tests are being built
parent
dfaf4911
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
slapos/recipe/cmmi/README.txt
slapos/recipe/cmmi/README.txt
+7
-0
slapos/recipe/cmmi/tests.py
slapos/recipe/cmmi/tests.py
+34
-0
No files found.
slapos/recipe/cmmi/README.txt
View file @
f1d327b2
...
...
@@ -33,6 +33,12 @@ Supported options
and if the values do not match the execution of the recipe will
fail.
``cleanup``
List of files / directories, separated by blanks, that will be removed
at the end of the build. This feature supports wildcards.
Basically, it's used to clean things like sources or documentation
``make-binary``
Path to the ``make`` program. Defaults to 'make' which
...
...
@@ -1079,3 +1085,4 @@ Contributors
* Guy Rozendorn (grzn)
* Marco Mariani (mmariani)
* galpin
* Thomas Larrieu (thomas.larrieu)
slapos/recipe/cmmi/tests.py
View file @
f1d327b2
...
...
@@ -307,6 +307,40 @@ class NonInformativeTests(unittest.TestCase):
build_directory
=
os
.
path
.
join
(
self
.
dir
,
'test_parts/test__compile__'
)
self
.
assertTrue
(
os
.
path
.
exists
(
build_directory
))
def
test_cleanup
(
self
):
recipe
=
self
.
make_recipe
(
{},
'test'
,
{
'url'
:
'file://%s/testdata/package-0.0.0.tar.gz'
%
os
.
path
.
dirname
(
__file__
),
'cleanup'
:
'foo
\
n
bar'
}
)
os
.
chdir
(
self
.
dir
)
tmp
=
open
(
'foo'
,
'a'
)
tmp
=
open
(
'bar'
,
'a'
)
self
.
assertTrue
(
os
.
path
.
exists
(
'foo'
))
self
.
assertTrue
(
os
.
path
.
exists
(
'bar'
))
recipe
.
install
()
self
.
assertFalse
(
os
.
path
.
exists
(
'foo'
))
self
.
assertFalse
(
os
.
path
.
exists
(
'bar'
))
def
test_cleanup_fails_when_file_does_not_exist
(
self
):
recipe
=
self
.
make_recipe
(
{},
'test'
,
{
'url'
:
'file://%s/testdata/package-0.0.0.tar.gz'
%
os
.
path
.
dirname
(
__file__
),
'cleanup'
:
'foo
\
n
bar'
}
)
os
.
chdir
(
self
.
dir
)
self
.
assertFalse
(
os
.
path
.
exists
(
'foo'
))
self
.
assertFalse
(
os
.
path
.
exists
(
'bar'
))
with
self
.
assertRaises
(
IOError
,
recipe
.
install
())
as
cm
:
print
cm
.
error_code
def
test_suite
():
suite
=
unittest
.
TestSuite
((
doctest
.
DocFileSuite
(
...
...
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