SCons / test / packaging / rpm /

Diff from to


 import os
-import glob
+import SCons.Tool.rpmutils
 import TestSCons
 _python_ = TestSCons._python_'', 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')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.