summaryrefslogtreecommitdiff
path: root/test/packaging
diff options
context:
space:
mode:
authordirkbaechle <devnull@localhost>2012-09-28 00:35:09 +0200
committerdirkbaechle <devnull@localhost>2012-09-28 00:35:09 +0200
commit21aab6cd889d35768cd19527d57ab62d46bc62b0 (patch)
tree1781448eb906652d808ea4bf50fdda4312fe23c1 /test/packaging
parentbfca4fd4b80657cc63149d9648f7309a84b4d07f (diff)
downloadscons-21aab6cd889d35768cd19527d57ab62d46bc62b0.tar.gz
- 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 4807a207..ab8734dd 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 b1abaab5..d8c2785a 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 4d6c76e2..30162748 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'