diff options
author | dirkbaechle <devnull@localhost> | 2012-09-05 01:23:13 +0200 |
---|---|---|
committer | dirkbaechle <devnull@localhost> | 2012-09-05 01:23:13 +0200 |
commit | 8d53f8adbaa758c53da24f7aa0f44e905137f2f3 (patch) | |
tree | 5d422a83251e4afe9a3941b3bb97a79fdb38765f /test/FindSourceFiles.py | |
parent | e7bd33843093affec4fc9d182613248f19ca9e10 (diff) | |
download | scons-8d53f8adbaa758c53da24f7aa0f44e905137f2f3.tar.gz |
- first swoop of changes for getting all Buildbot slaves to run successfully again
Diffstat (limited to 'test/FindSourceFiles.py')
-rw-r--r-- | test/FindSourceFiles.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/FindSourceFiles.py b/test/FindSourceFiles.py index b08cbbd5..3ba542bd 100644 --- a/test/FindSourceFiles.py +++ b/test/FindSourceFiles.py @@ -32,11 +32,17 @@ import TestSCons test = TestSCons.TestSCons() +package_format = "src_tarbz2" +if not test.where_is('tar'): + if not test.where_is('zip'): + test.skip_test("neither 'tar' nor 'zip' found; skipping test\n") + package_format = "src_zip" + # Quite complex, but real-life test. # 0. Setup VariantDir, "var", without duplication. The "src" is source dir. # 1. Generate souce file var/foo.c from src/foo.c.in. Define program foo. # 2. Gather all sources necessary to create '.' node and create source -# tarball. We expect 'src/foo.c.in' file within tarbal, and no content +# tarball. We expect 'src/foo.c.in' file within tarball, and no content # under 'var' directory. test.subdir('src') @@ -45,10 +51,10 @@ VariantDir(src_dir = 'src', variant_dir = 'var', duplicate = 0) env = Environment(tools = ['default','textfile','packaging']) SConscript(['var/SConscript'], exports = 'env') sources = env.FindSourceFiles('.') -pkg = env.Package( NAME = 'foo', VERSION = '1.0', PACKAGETYPE = 'src_tarbz2', +pkg = env.Package( NAME = 'foo', VERSION = '1.0', PACKAGETYPE = '%s', source = sources ) Ignore( '.', pkg ) -""") +""" % package_format) test.write('src/SConscript', """ Import('env') |