summaryrefslogtreecommitdiffstats
path: root/test/packaging
diff options
context:
space:
mode:
authordirkbaechle <devnull@localhost>2012-09-27 22:35:09 (GMT)
committerdirkbaechle <devnull@localhost>2012-09-27 22:35:09 (GMT)
commita6d1f2c5f7282a4c25bc20059054cbc0a6d9a688 (patch)
tree1781448eb906652d808ea4bf50fdda4312fe23c1 /test/packaging
parentedbb8113bf8737e7bc77a4f23d7fd41a44dca5a6 (diff)
downloadSCons-a6d1f2c5f7282a4c25bc20059054cbc0a6d9a688.zip
SCons-a6d1f2c5f7282a4c25bc20059054cbc0a6d9a688.tar.gz
SCons-a6d1f2c5f7282a4c25bc20059054cbc0a6d9a688.tar.bz2
- several smaller fixes to get all tests running under Buildbot again
Diffstat (limited to 'test/packaging')
-rw-r--r--test/packaging/rpm/multipackage.py12
-rw-r--r--test/packaging/rpm/package.py8
-rw-r--r--test/packaging/rpm/tagging.py8
3 files changed, 14 insertions, 14 deletions
diff --git a/test/packaging/rpm/multipackage.py b/test/packaging/rpm/multipackage.py
index 4807a20..ab8734d 100644
--- a/test/packaging/rpm/multipackage.py
+++ b/test/packaging/rpm/multipackage.py
@@ -30,7 +30,7 @@ from one SCons environment.
"""
import os
-import glob
+import SCons.Tool.rpmutils
import TestSCons
_python_ = TestSCons._python_
@@ -98,18 +98,18 @@ env.Alias( 'install', prog )
test.run(arguments='', stderr = None)
src_rpm = 'foo-1.2.3-0.src.rpm'
-machine_rpm = 'foo-1.2.3-0.*.rpm'
+machine_rpm = 'foo-1.2.3-0.%s.rpm' % SCons.Tool.rpmutils.defaultMachine()
src_rpm2 = 'foo2-1.2.3-0.src.rpm'
-machine_rpm2 = 'foo2-1.2.3-0.*.rpm'
+machine_rpm2 = 'foo2-1.2.3-0.%s.rpm' % SCons.Tool.rpmutils.defaultMachine()
-test.must_exist_one_of( [machine_rpm] )
+test.must_exist( machine_rpm )
test.must_exist( src_rpm )
-test.must_exist_one_of( [machine_rpm2] )
+test.must_exist( machine_rpm2 )
test.must_exist( src_rpm2 )
test.must_not_exist( 'bin/main' )
-test.fail_test( not os.popen('rpm -qpl %s' % glob.glob(machine_rpm)[0].lstrip('./')).read()=='/bin/main\n')
+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.pass_test()
diff --git a/test/packaging/rpm/package.py b/test/packaging/rpm/package.py
index b1abaab..d8c2785 100644
--- a/test/packaging/rpm/package.py
+++ b/test/packaging/rpm/package.py
@@ -29,7 +29,7 @@ Test the ability to create a really simple rpm package.
"""
import os
-import glob
+import SCons.Tool.rpmutils
import TestSCons
_python_ = TestSCons._python_
@@ -83,12 +83,12 @@ env.Alias( 'install', prog )
test.run(arguments='', stderr = None)
src_rpm = 'foo-1.2.3-0.src.rpm'
-machine_rpm = 'foo-1.2.3-0.*.rpm'
+machine_rpm = 'foo-1.2.3-0.%s.rpm' % SCons.Tool.rpmutils.defaultMachine()
-test.must_exist_one_of( [machine_rpm] )
+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' % glob.glob(machine_rpm)[0].lstrip('./')).read()=='/bin/main\n')
+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.pass_test()
diff --git a/test/packaging/rpm/tagging.py b/test/packaging/rpm/tagging.py
index 4d6c76e..3016274 100644
--- a/test/packaging/rpm/tagging.py
+++ b/test/packaging/rpm/tagging.py
@@ -29,7 +29,7 @@ Test the ability to add file tags
"""
import os
-import glob
+import SCons.Tool.rpmutils
import TestSCons
@@ -88,11 +88,11 @@ env.Package( NAME = 'foo',
test.run(arguments='', stderr = None)
src_rpm = 'foo-1.2.3-0.src.rpm'
-machine_rpm = 'foo-1.2.3-0.*.rpm'
+machine_rpm = 'foo-1.2.3-0.%s.rpm' % SCons.Tool.rpmutils.defaultMachine()
-test.must_exist_one_of( [machine_rpm] )
+test.must_exist( machine_rpm )
test.must_exist( src_rpm )
-test.fail_test( not os.popen('rpm -qpl %s' % glob.glob(machine_rpm)[0].lstrip('./')).read()=='/bin/main\n')
+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')
expect = '(0755, root, users) /bin/main'