diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-03-28 03:35:22 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-04-13 20:56:50 (GMT) |
commit | 5972f959fc82802bc0109de361c01ee164da9876 (patch) | |
tree | e133e2f621c0b352fe41cb1d55f88bd170c81c45 /test/ninja/generate_and_build.py | |
parent | f5315e8287649208b8dda0da06bbb9e7d18542dd (diff) | |
download | SCons-5972f959fc82802bc0109de361c01ee164da9876.zip SCons-5972f959fc82802bc0109de361c01ee164da9876.tar.gz SCons-5972f959fc82802bc0109de361c01ee164da9876.tar.bz2 |
fix broken target check in ninja_execute. It was improperly adding all nodes to NINJA_STATE.add_build(). Instead of only ones which weren't ninja files, nor conftest files
Diffstat (limited to 'test/ninja/generate_and_build.py')
-rw-r--r-- | test/ninja/generate_and_build.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/test/ninja/generate_and_build.py b/test/ninja/generate_and_build.py index 147ba3a..6972a54 100644 --- a/test/ninja/generate_and_build.py +++ b/test/ninja/generate_and_build.py @@ -23,6 +23,7 @@ # import os + import TestSCons from TestCmd import IS_WINDOWS @@ -34,7 +35,7 @@ except ImportError: test.skip_test("Could not find module in python") _python_ = TestSCons._python_ -_exe = TestSCons._exe +_exe = TestSCons._exe ninja_bin = os.path.abspath(os.path.join( ninja.__file__, @@ -45,19 +46,14 @@ ninja_bin = os.path.abspath(os.path.join( test.dir_fixture('ninja-fixture') -test.write('SConstruct', """ -env = Environment() -env.Tool('ninja') -env.Program(target = 'foo', source = 'foo.c') -""") - +test.file_fixture('ninja_test_sconscripts/sconstruct_generate_and_build.py', 'SConstruct') # generate simple build test.run(stdout=None) test.must_contain_all_lines(test.stdout(), ['Generating: build.ninja']) test.must_contain_all(test.stdout(), 'Executing:') -test.must_contain_all(test.stdout(), 'ninja%(_exe)s -f' %locals()) -test.run(program = test.workpath('foo' + _exe), stdout="foo.c") +test.must_contain_all(test.stdout(), 'ninja%(_exe)s -f' % locals()) +test.run(program=test.workpath('foo' + _exe), stdout="foo.c") # clean build and ninja files test.run(arguments='-c', stdout=None) @@ -73,8 +69,8 @@ test.must_not_exist(test.workpath('foo' + _exe)) # run ninja independently program = test.workpath('run_ninja_env.bat') if IS_WINDOWS else ninja_bin -test.run(program = program, stdout=None) -test.run(program = test.workpath('foo' + _exe), stdout="foo.c") +test.run(program=program, stdout=None) +test.run(program=test.workpath('foo' + _exe), stdout="foo.c") test.pass_test() |