diff options
author | Mats Wichmann <mats@linux.com> | 2018-09-04 13:50:08 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2018-09-04 14:50:46 (GMT) |
commit | 2915abd83891c89e0302cf3f35e367de55c0abab (patch) | |
tree | d80b06790710dc1114bddee23f6098f1e5558dfd /test/packaging/rpm | |
parent | 00673a71ed8aeb99831272e0daba01ad36cdd073 (diff) | |
download | SCons-2915abd83891c89e0302cf3f35e367de55c0abab.zip SCons-2915abd83891c89e0302cf3f35e367de55c0abab.tar.gz SCons-2915abd83891c89e0302cf3f35e367de55c0abab.tar.bz2 |
generalize the fix for #3164
Add a new flag, X_RPM_EXTRADEFS, which lets the user supply
any additional flag lines needed in the specfile. If the
tag is not present in the specfile, supply a value which
turns off debug package generation. To retain debug package
generation, supply the flag with a value of None, or with
a list that does not include the disable value.
So like the previous change the default is now not to
generate debug, but that default can be overridden, and it
is documented.
Diffstat (limited to 'test/packaging/rpm')
-rw-r--r-- | test/packaging/rpm/cleanup.py | 10 | ||||
-rw-r--r-- | test/packaging/rpm/explicit-target.py | 10 | ||||
-rw-r--r-- | test/packaging/rpm/internationalization.py | 17 | ||||
-rw-r--r-- | test/packaging/rpm/multipackage.py | 9 | ||||
-rw-r--r-- | test/packaging/rpm/package.py | 9 | ||||
-rw-r--r-- | test/packaging/rpm/src/main.c | 5 | ||||
-rw-r--r-- | test/packaging/rpm/tagging.py | 10 |
7 files changed, 20 insertions, 50 deletions
diff --git a/test/packaging/rpm/cleanup.py b/test/packaging/rpm/cleanup.py index b77dfd1..7483750 100644 --- a/test/packaging/rpm/cleanup.py +++ b/test/packaging/rpm/cleanup.py @@ -28,6 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" Assert that files created by the RPM packager will be removed by 'scons -c'. """ +import os import TestSCons import SCons.Tool.rpmutils @@ -47,13 +48,8 @@ if not rpm: rpm_build_root = test.workpath('rpm_build_root') test.subdir('src') - -test.write( [ 'src', 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ - return 0; -} -""") +mainpath = os.path.join('src', 'main.c') +test.file_fixture(mainpath, mainpath) test.write('SConstruct', """ env=Environment(tools=['default', 'packaging']) diff --git a/test/packaging/rpm/explicit-target.py b/test/packaging/rpm/explicit-target.py index c383b57..e8fbd39 100644 --- a/test/packaging/rpm/explicit-target.py +++ b/test/packaging/rpm/explicit-target.py @@ -28,6 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" Test the ability to create a rpm package from a explicit target name. """ +import os import TestSCons _python_ = TestSCons._python_ @@ -44,13 +45,8 @@ if not rpm: rpm_build_root = test.workpath('rpm_build_root') test.subdir('src') - -test.write( [ 'src', 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ - return 0; -} -""") +mainpath = os.path.join('src', 'main.c') +test.file_fixture(mainpath, mainpath) test.write('SConstruct', """ import os diff --git a/test/packaging/rpm/internationalization.py b/test/packaging/rpm/internationalization.py index 2ef0dfd..ad77f40 100644 --- a/test/packaging/rpm/internationalization.py +++ b/test/packaging/rpm/internationalization.py @@ -33,7 +33,6 @@ These are x-rpm-Group, description, summary and the lang_xx file tag. import os import SCons.Tool.rpmutils - import TestSCons _python_ = TestSCons._python_ @@ -52,12 +51,7 @@ rpm_build_root = test.workpath('rpm_build_root') # # test INTERNATIONAL PACKAGE META-DATA # -test.write( [ 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ - return 0; -} -""") +test.file_fixture('src/main.c', 'main.c') test.write('SConstruct', """ # -*- coding: utf-8 -*- @@ -123,13 +117,8 @@ test.fail_test( out != 'Application/office-hello-this should be really long' ) # # test INTERNATIONAL PACKAGE TAGS # - -test.write( [ 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ - return 0; -} -""") +mainpath = os.path.join('src', 'main.c') +test.file_fixture(mainpath) test.write( ['man.de'], '' ) test.write( ['man.en'], '' ) diff --git a/test/packaging/rpm/multipackage.py b/test/packaging/rpm/multipackage.py index f756cf4..fd67a09 100644 --- a/test/packaging/rpm/multipackage.py +++ b/test/packaging/rpm/multipackage.py @@ -47,13 +47,8 @@ if not rpm: rpm_build_root = test.workpath('rpm_build_root') test.subdir('src') - -test.write( [ 'src', 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ - return 0; -} -""") +mainpath = os.path.join('src', 'main.c') +test.file_fixture(mainpath, mainpath) test.write('SConstruct', """ import os diff --git a/test/packaging/rpm/package.py b/test/packaging/rpm/package.py index 6723a9f..2ba66b9 100644 --- a/test/packaging/rpm/package.py +++ b/test/packaging/rpm/package.py @@ -46,13 +46,8 @@ if not rpm: rpm_build_root = test.workpath('rpm_build_root') test.subdir('src') - -test.write( [ 'src', 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ - return 0; -} -""") +mainpath = os.path.join('src', 'main.c') +test.file_fixture(mainpath, mainpath) test.write('SConstruct', """ import os diff --git a/test/packaging/rpm/src/main.c b/test/packaging/rpm/src/main.c new file mode 100644 index 0000000..49e8969 --- /dev/null +++ b/test/packaging/rpm/src/main.c @@ -0,0 +1,5 @@ + +int main( int argc, char* argv[] ) +{ + return 0; +} diff --git a/test/packaging/rpm/tagging.py b/test/packaging/rpm/tagging.py index 15f82a7..b685c91 100644 --- a/test/packaging/rpm/tagging.py +++ b/test/packaging/rpm/tagging.py @@ -30,7 +30,6 @@ Test the ability to add file tags import os import SCons.Tool.rpmutils - import TestSCons _python_ = TestSCons._python_ @@ -50,13 +49,8 @@ rpm_build_root = test.workpath('rpm_build_root') # Test adding an attr tag to the built program. # test.subdir('src') - -test.write( [ 'src', 'main.c' ], r""" -int main( int argc, char* argv[] ) -{ -return 0; -} -""") +mainpath = os.path.join('src', 'main.c') +test.file_fixture(mainpath, mainpath) test.write('SConstruct', """ import os |