diff options
Diffstat (limited to 'test/packaging/rpm')
-rw-r--r-- | test/packaging/rpm/cleanup.py | 5 | ||||
-rw-r--r-- | test/packaging/rpm/internationalization.py | 3 | ||||
-rw-r--r-- | test/packaging/rpm/package.py | 3 | ||||
-rw-r--r-- | test/packaging/rpm/tagging.py | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/test/packaging/rpm/cleanup.py b/test/packaging/rpm/cleanup.py index 26bf79b..5472fbb 100644 --- a/test/packaging/rpm/cleanup.py +++ b/test/packaging/rpm/cleanup.py @@ -45,6 +45,8 @@ rpm = test.Environment().WhereIs('rpm') if not rpm: test.skip_test('rpm not found, skipping test\n') +rpm_build_root = test.workpath('rpm_build_root') + test.subdir('src') test.write( [ 'src', 'main.c' ], r""" @@ -57,7 +59,10 @@ int main( int argc, char* argv[] ) test.write('SConstruct', """ env=Environment(tools=['default', 'packaging']) +env['ENV']['RPM_BUILD_ROOT'] = r'%(rpm_build_root)s/foo-1.2.3' + env.Prepend(RPM = 'TAR_OPTIONS=--wildcards ') +env.Append(RPMFLAGS = r' --buildroot %(rpm_build_root)s') prog = env.Install( '/bin/' , Program( 'src/main.c') ) diff --git a/test/packaging/rpm/internationalization.py b/test/packaging/rpm/internationalization.py index 66c2291..af0bc75 100644 --- a/test/packaging/rpm/internationalization.py +++ b/test/packaging/rpm/internationalization.py @@ -47,6 +47,8 @@ rpm = test.Environment().WhereIs('rpm') if not rpm: test.skip_test('rpm not found, skipping test\n') +rpm_build_root = test.workpath('rpm_build_root') + # # test INTERNATIONAL PACKAGE META-DATA # @@ -64,6 +66,7 @@ import os env = Environment(tools=['default', 'packaging']) env.Prepend(RPM = 'TAR_OPTIONS=--wildcards ') +env.Append(RPMFLAGS = r' --buildroot %(rpm_build_root)s') prog = env.Install( '/bin', Program( 'main.c' ) ) diff --git a/test/packaging/rpm/package.py b/test/packaging/rpm/package.py index a5f9f0f..2a37265 100644 --- a/test/packaging/rpm/package.py +++ b/test/packaging/rpm/package.py @@ -43,6 +43,8 @@ rpm = test.Environment().WhereIs('rpm') if not rpm: test.skip_test('rpm not found, skipping test\n') +rpm_build_root = test.workpath('rpm_build_root') + test.subdir('src') test.write( [ 'src', 'main.c' ], r""" @@ -58,6 +60,7 @@ import os env=Environment(tools=['default', 'packaging']) env.Prepend(RPM = 'TAR_OPTIONS=--wildcards ') +env.Append(RPMFLAGS = r' --buildroot %(rpm_build_root)s') prog = env.Install( '/bin/' , Program( 'src/main.c') ) diff --git a/test/packaging/rpm/tagging.py b/test/packaging/rpm/tagging.py index 198799a..d0fce83 100644 --- a/test/packaging/rpm/tagging.py +++ b/test/packaging/rpm/tagging.py @@ -45,6 +45,8 @@ rpm = test.Environment().WhereIs('rpm') if not rpm: test.skip_test('rpm not found, skipping test\n') +rpm_build_root = test.workpath('rpm_build_root') + # # Test adding an attr tag to the built program. # @@ -61,7 +63,10 @@ test.write('SConstruct', """ import os env = Environment(tools=['default', 'packaging']) + env.Prepend(RPM = 'TAR_OPTIONS=--wildcards ') +env.Append(RPMFLAGS = r' --buildroot %(rpm_build_root)s') + install_dir= os.path.join( ARGUMENTS.get('prefix', '/'), 'bin/' ) prog_install = env.Install( install_dir , Program( 'src/main.c' ) ) env.Tag( prog_install, UNIX_ATTR = '(0755, root, users)' ) |