diff options
author | Adam Gross <grossag@vmware.com> | 2020-01-13 18:41:28 (GMT) |
---|---|---|
committer | Adam Gross <grossag@vmware.com> | 2020-01-13 18:45:04 (GMT) |
commit | 420f23129a3eb298e20e2250f97eb8eefdd923d4 (patch) | |
tree | 0ebea3ea5a45bf481f8986d7bb4ab1e7729c5c54 /test/implicit | |
parent | df23cffb83106a243f762258aa645edc86f05779 (diff) | |
download | SCons-420f23129a3eb298e20e2250f97eb8eefdd923d4.zip SCons-420f23129a3eb298e20e2250f97eb8eefdd923d4.tar.gz SCons-420f23129a3eb298e20e2250f97eb8eefdd923d4.tar.bz2 |
Change IMPLICIT_COMMAND_DEPENDENCIES meaning as requested in PR
Diffstat (limited to 'test/implicit')
-rw-r--r-- | test/implicit/IMPLICIT_COMMAND_DEPENDENCIES.py | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/test/implicit/IMPLICIT_COMMAND_DEPENDENCIES.py b/test/implicit/IMPLICIT_COMMAND_DEPENDENCIES.py index bec9223..bec2255 100644 --- a/test/implicit/IMPLICIT_COMMAND_DEPENDENCIES.py +++ b/test/implicit/IMPLICIT_COMMAND_DEPENDENCIES.py @@ -83,6 +83,7 @@ env.PrependENVPath('PATHEXT', '.PY') env0 = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 0) env1 = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 1) env2 = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 2) +envAll = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 'all') envNone = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = None) envFalse = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = False) envTrue = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = True) @@ -94,12 +95,15 @@ env.BuildFile('file.out', 'file.in') env0.BuildFile('file0.out', 'file.in') env1.BuildFile('file1.out', 'file.in') env2.BuildFile('file2.out', 'file.in') +envAll.BuildFile('fileall.out', 'file.in') envNone.BuildFile('fileNone.out', 'file.in') envFalse.BuildFile('fileFalse.out', 'file.in') envTrue.BuildFile('fileTrue.out', 'file.in') envTrue.BuildFile('fileQuote.out', 'file.in', BUILD_PY='"build.py"') -env2.CdAndBuildFile('cd_file.out', 'file.in') +env1.CdAndBuildFile('cd_file1.out', 'file.in') +env2.CdAndBuildFile('cd_file2.out', 'file.in') +envAll.CdAndBuildFile('cd_fileall.out', 'file.in') """ % locals()) @@ -113,25 +117,31 @@ def run_test(extra, python, _python_): # Run the SConscript file. test.run(arguments = '--tree=all .') - # Generate some expected data, which depends on the value of "extra". - expect_none = 'build.py %s file.in\nfile.in\n' - expect_extra = (expect_none if not extra else + # Generate some expected data of actions involving build.py. This expected + # data depends on the value of "extra". + build_none = 'build.py %s file.in\nfile.in\n' + build_extra = (build_none if not extra else 'build.py %s file.in\n{}file.in\n'.format( extra.replace('\\\\n', '\n'))) - expect_extra_abs = '{} %s file.in\n{}file.in\n'.format( + build_extra_abs = '{} %s file.in\n{}file.in\n'.format( test.workpath('build.py'), extra.replace('\\\\n', '\n')) + empty_none = 'empty.py %s file.in\nfile.in\n' + # Verify that the output matches what is expected. - test.must_match('file.out', expect_none % 'file.out', mode='r') - test.must_match('file0.out', expect_none % 'file0.out', mode='r') - test.must_match('file1.out', expect_none % 'file1.out', mode='r') - test.must_match('file2.out', expect_extra % 'file2.out', mode='r') - test.must_match('fileNone.out', expect_none % 'fileNone.out', mode='r') - test.must_match('fileFalse.out', expect_none % 'fileFalse.out', mode='r') - test.must_match('fileTrue.out', expect_none % 'fileTrue.out', mode='r') - test.must_match('fileQuote.out', expect_none % 'fileQuote.out', mode='r') - test.must_match('cd_file.out', expect_extra % 'cd_file.out', mode='r') + test.must_match('file.out', build_none % 'file.out', mode='r') + test.must_match('file0.out', build_none % 'file0.out', mode='r') + test.must_match('file1.out', build_none % 'file1.out', mode='r') + test.must_match('file2.out', build_extra % 'file2.out', mode='r') + test.must_match('fileall.out', build_extra % 'fileall.out', mode='r') + test.must_match('fileNone.out', build_none % 'fileNone.out', mode='r') + test.must_match('fileFalse.out', build_none % 'fileFalse.out', mode='r') + test.must_match('fileTrue.out', build_none % 'fileTrue.out', mode='r') + test.must_match('fileQuote.out', build_none % 'fileQuote.out', mode='r') + test.must_match('cd_file1.out', build_none % 'cd_file1.out', mode='r') + test.must_match('cd_file2.out', build_extra % 'cd_file2.out', mode='r') + test.must_match('cd_fileall.out', build_extra % 'cd_fileall.out', mode='r') run_test('', python, _python_) |