summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-03-28 04:27:52 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2021-04-13 20:56:50 (GMT)
commit93ad3b1b41b98e4eaf5a74b2694c21835038cf31 (patch)
tree2cfbb3d4343453bd3845fae4158bf974a200a8e9
parentedf9643d4c0ced3884d47c04fe62f47ad8567bd0 (diff)
downloadSCons-93ad3b1b41b98e4eaf5a74b2694c21835038cf31.zip
SCons-93ad3b1b41b98e4eaf5a74b2694c21835038cf31.tar.gz
SCons-93ad3b1b41b98e4eaf5a74b2694c21835038cf31.tar.bz2
more sider fixes
-rw-r--r--SCons/Tool/ninja.py4
-rw-r--r--test/ninja/generate_and_build_cxx.py22
-rw-r--r--test/ninja/generate_source.py11
3 files changed, 17 insertions, 20 deletions
diff --git a/SCons/Tool/ninja.py b/SCons/Tool/ninja.py
index 36daec6..88b7d48 100644
--- a/SCons/Tool/ninja.py
+++ b/SCons/Tool/ninja.py
@@ -22,5 +22,5 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# noqa: F401
-from .ninjaCommon import generate, exists
+
+from .ninjaCommon import generate, exists # noqa: F401
diff --git a/test/ninja/generate_and_build_cxx.py b/test/ninja/generate_and_build_cxx.py
index 481a7e5..074a5cb 100644
--- a/test/ninja/generate_and_build_cxx.py
+++ b/test/ninja/generate_and_build_cxx.py
@@ -35,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__,
@@ -46,19 +46,15 @@ ninja_bin = os.path.abspath(os.path.join(
test.dir_fixture('ninja-fixture')
-# test.write('SConstruct', """
-# env = Environment()
-# env.Tool('ninja')
-# env.Program(target = 'test2', source = 'test2.cpp')
-# """)
-test.file_fixture('ninja_test_sconscripts/sconstruct_generate_and_build_cxx', 'SConstruct')
+test.file_fixture('ninja_test_sconscripts/sconstruct_generate_and_build_cxx',
+ 'SConstruct')
# generate simple build
test.run()
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('test2' + _exe), stdout="print_function")
+test.must_contain_all(test.stdout(), 'ninja%(_exe)s -f' % locals())
+test.run(program=test.workpath('test2' + _exe), stdout="print_function")
# clean build and ninja files
test.run(arguments='-c', stdout=None)
@@ -74,8 +70,8 @@ test.must_not_exist(test.workpath('test2' + _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('test2' + _exe), stdout="print_function")
+test.run(program=program, stdout=None)
+test.run(program=test.workpath('test2' + _exe), stdout="print_function")
test.write('test2.hpp', """
#include <string>
@@ -93,8 +89,8 @@ public:
""")
# generate simple build
-test.run(program = program, stdout=None)
-test.run(program = test.workpath('test2' + _exe), stdout="print_function2")
+test.run(program=program, stdout=None)
+test.run(program=test.workpath('test2' + _exe), stdout="print_function2")
test.pass_test()
diff --git a/test/ninja/generate_source.py b/test/ninja/generate_source.py
index 141b19c..18b53f2 100644
--- a/test/ninja/generate_source.py
+++ b/test/ninja/generate_source.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__,
@@ -79,8 +80,8 @@ int main(int argc, char *argv[]) {
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('generated_source' + _exe), stdout="generated_source.c")
+test.must_contain_all(test.stdout(), 'ninja%(_exe)s -f' % locals())
+test.run(program=test.workpath('generated_source' + _exe), stdout="generated_source.c")
# clean build and ninja files
test.run(arguments='-c', stdout=None)
@@ -99,8 +100,8 @@ test.must_not_exist(test.workpath('generated_source' + _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('generated_source' + _exe), stdout="generated_source.c")
+test.run(program=program, stdout=None)
+test.run(program=test.workpath('generated_source' + _exe), stdout="generated_source.c")
test.pass_test()