diff options
author | William Deegan <bill@baddogconsulting.com> | 2022-06-15 17:34:28 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2022-06-15 17:34:28 (GMT) |
commit | ebddf72883feda3d7e70b2abcba0a44f284a7dd1 (patch) | |
tree | b1b942ca1adb709fe84a8b815ae338d79e0d8336 | |
parent | dfc8eacbc4e0157aa235b7f6bacf1d956f8ba673 (diff) | |
download | SCons-ebddf72883feda3d7e70b2abcba0a44f284a7dd1.zip SCons-ebddf72883feda3d7e70b2abcba0a44f284a7dd1.tar.gz SCons-ebddf72883feda3d7e70b2abcba0a44f284a7dd1.tar.bz2 |
added message to test failure, and removed unneeded import SCons in fixture sconstruct
-rw-r--r-- | SCons/Tool/ninja/__init__.py | 2 | ||||
-rw-r--r-- | test/ninja/ninja_file_deterministic.py | 2 | ||||
-rw-r--r-- | test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/SCons/Tool/ninja/__init__.py b/SCons/Tool/ninja/__init__.py index 9eaeacb..f0bdee5 100644 --- a/SCons/Tool/ninja/__init__.py +++ b/SCons/Tool/ninja/__init__.py @@ -72,7 +72,7 @@ def ninja_builder(env, target, source): raise SCons.Errors.BuildError( errstr=f"ERROR: an exception occurred while generating the ninja file:\n{traceback.format_exc()}", node=target) - + if env["PLATFORM"] == "win32": # TODO: Is this necessary as you set env variable in the ninja build file per target? # this is not great, its doesn't consider specific diff --git a/test/ninja/ninja_file_deterministic.py b/test/ninja/ninja_file_deterministic.py index ef1abdc..9832f22 100644 --- a/test/ninja/ninja_file_deterministic.py +++ b/test/ninja/ninja_file_deterministic.py @@ -65,7 +65,7 @@ test.must_contain_all(test.stdout(), 'ninja%(_exe)s -f' % locals()) test.must_exist([test.workpath('out1.txt'), test.workpath('out2.txt')]) if os.path.getmtime(test.workpath('build.ninja')) != ninja_file_mtime: - test.fail_test() + test.fail_test(message="build.ninja file has been updated (mtime changed) and should not have been") # make sure the ninja file was deterministic if not filecmp.cmp(test.workpath('build.ninja'), test.workpath('build.ninja.orig')): diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism index 6bd7c26..3d3eecb 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism +++ b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism @@ -1,6 +1,6 @@ -import SCons import random -SetOption('experimental','ninja') + +SetOption('experimental', 'ninja') SetOption('skip_ninja_regen', True) DefaultEnvironment(tools=[]) @@ -17,4 +17,3 @@ for i in range(1, 10): if j == i: continue env.Depends(node, f'out{j}.txt') - |