summaryrefslogtreecommitdiffstats
path: root/test/packaging/rpm/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/packaging/rpm/package.py')
-rw-r--r--test/packaging/rpm/package.py8
1 files changed, 4 insertions, 4 deletions
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()