diff options
Diffstat (limited to 'test/packaging')
-rw-r--r-- | test/packaging/multiple-packages-at-once.py | 17 | ||||
-rw-r--r-- | test/packaging/rpm/explicit-target.py | 14 |
2 files changed, 21 insertions, 10 deletions
diff --git a/test/packaging/multiple-packages-at-once.py b/test/packaging/multiple-packages-at-once.py index 3151c05..bbf273f 100644 --- a/test/packaging/multiple-packages-at-once.py +++ b/test/packaging/multiple-packages-at-once.py @@ -79,4 +79,21 @@ test.run(arguments='', stderr = None) test.must_exist( 'src-1.0.zip' ) test.must_exist( 'src-1.0.tar.gz' ) +test.write('SConstruct', """ +Program( 'src/main.c' ) +env=Environment(tools=['default', 'packaging']) +env.Package( PACKAGETYPE = ['src_zip', 'src_targz'], + NAME = "src", VERSION = "1.0", + PACKAGEROOT = 'test', + source = [ 'src/main.c', 'SConstruct' ], + target = 'src.zip' ) +""") + +test.run(arguments='', stderr = None) + +test.must_exist( 'src.zip' ) +test.must_exist( 'src-1.0.tar.gz' ) + + + test.pass_test() diff --git a/test/packaging/rpm/explicit-target.py b/test/packaging/rpm/explicit-target.py index 12a6c6c..b9fcc0f 100644 --- a/test/packaging/rpm/explicit-target.py +++ b/test/packaging/rpm/explicit-target.py @@ -31,7 +31,6 @@ Test the ability to create a rpm package from a explicit target name. import os import TestSCons -machine = TestSCons.machine _python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -81,15 +80,10 @@ env.Package( NAME = 'foo', ) """ % locals()) -test.run(arguments='', stderr = None) +expect = """ +scons: *** Setting target is not supported for rpm. +""" + test.python_file_line(test.workpath('SConstruct'), 24) -src_rpm = 'foo-1.2.3-0.src.rpm' -machine_rpm = 'foo-1.2.3-0.%s.rpm' % machine - -test.must_exist( machine_rpm ) -test.must_exist( src_rpm ) -test.must_not_exist( 'bin/main' ) -test.fail_test( not os.popen('rpm -qpl %s' % machine_rpm).read()=='/bin/main\n') -test.fail_test( not os.popen('rpm -qpl %s' % src_rpm).read()=='foo-1.2.3.spec\nfoo-1.2.3.tar.gz\n') +test.run(arguments='', status=2, stderr=expect) test.pass_test() |