From 14a58022619c81533bcc7fe1f026dd02409235b3 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 20 Feb 2023 11:43:59 -0700 Subject: Add a copyright header to test files A lot of files that are not the main test scripts had no license/copyright headers. This change adds those. In a small number of cases, this necessitaed a change to an expected line number from a failure/exception message. Along the way, some are lightly reformatted and some add a DefaultEnvironment call. Signed-off-by: Mats Wichmann --- test/AS/fixture/myas.py | 4 + test/AS/fixture/myas_args.py | 4 + test/Actions/addpost-link-fixture/strip.py | 5 ++ test/Actions/addpost-link-fixture/test1.c | 5 ++ test/Actions/addpost-link-fixture/test_lib.c | 4 + test/Actions/append-fixture/foo.c | 4 + test/Actions/pre-post-fixture/work1/bar.c | 4 + test/Actions/pre-post-fixture/work1/foo.c | 4 + test/Actions/pre-post-fixture/work2/SConstruct | 14 +++- test/Actions/pre-post-fixture/work3/SConstruct | 8 ++ test/Actions/pre-post-fixture/work4/build.py | 5 ++ test/Actions/pre-post.py | 2 +- test/Actions/subst_shell_env-fixture/SConstruct | 5 ++ test/Actions/unicode-signature-fixture/SConstruct | 6 +- test/Batch/SConstruct_changed_sources_alwaysBuild | 8 +- test/Batch/changed_sources_main.cpp | 3 + test/CC/CC-fixture/bar.c | 4 + test/CC/CC-fixture/foo.c | 4 + test/CC/CC-fixture/mycc.py | 4 + test/CC/CCVERSION-fixture/versioned.py | 5 ++ test/CC/gcc-non-utf8-fixture/gcc-non-utf8.py | 4 + test/CXX/CXX-fixture/myc++.py | 4 + test/CacheDir/CACHEDIR_CLASS_fixture/SConstruct | 9 ++- test/CacheDir/custom_cachedir_fixture/SConstruct | 9 ++- test/CacheDir/double_cachedir_fixture/SConstruct | 8 +- .../invalid_custom_cachedir_fixture/SConstruct | 7 +- test/CacheDir/value_dependencies/SConstruct | 14 ++-- test/CompilationDatabase/fixture/SConstruct | 4 + .../fixture/SConstruct_tempfile | 4 + .../CompilationDatabase/fixture/SConstruct_variant | 4 + test/Configure/conftest_source_file/SConstruct | 6 +- test/Configure/conftest_source_file/header1.h | 6 +- test/Configure/conftest_source_file/header2.h | 6 +- test/Configure/conftest_source_file/header3.h | 6 +- test/Configure/conftest_source_file/main.c | 6 +- test/Configure/fixture/SConstruct.issue-2906 | 7 +- test/Configure/is_conftest/fixture/SConstruct | 10 ++- ...ssue-2906-useful-duplicate-configure-message.py | 9 +-- test/Configure/issue-3469/fixture/SConstruct | 1 - test/D/AllAtOnce/Image/SConstruct_template | 18 +++-- test/D/AllAtOnce/Image/amod.d | 4 + test/D/AllAtOnce/Image/bmod.d | 4 + test/D/AllAtOnce/Image/main.d | 4 + test/D/CoreScanner/Image/SConstruct_template | 8 +- test/D/CoreScanner/Image/ignored.d | 4 + test/D/CoreScanner/Image/module1.d | 4 + test/D/CoreScanner/Image/module2.d | 4 + test/D/CoreScanner/Image/p/ignored.d | 4 + test/D/CoreScanner/Image/p/submodule1.d | 4 + test/D/CoreScanner/Image/p/submodule2.d | 4 + test/D/CoreScanner/Image/test1.d | 4 + test/D/CoreScanner/Image/test2.d | 4 + test/D/HSTeoh/ArLibIssue/SConstruct_template | 8 +- .../D/HSTeoh/LibCompileOptions/SConstruct_template | 14 ++-- test/D/HSTeoh/LibCompileOptions/prog.d | 4 + test/D/HSTeoh/LinkingProblem/SConstruct_template | 13 ++-- test/D/HSTeoh/LinkingProblem/cprog.c | 4 + test/D/HSTeoh/LinkingProblem/ncurs_impl.c | 4 + test/D/HSTeoh/LinkingProblem/prog.d | 4 + .../SConstruct_template | 13 +++- .../SingleStringCannotBeMultipleOptions/cmod.c | 4 + .../SingleStringCannotBeMultipleOptions/mod1.d | 4 + .../SingleStringCannotBeMultipleOptions/proj.d | 4 + .../Image/SConstruct_template | 9 ++- .../CompileAndLinkOneStep/Image/helloWorld.d | 4 + .../Image/SConstruct_template | 10 +-- .../CompileThenLinkTwoSteps/Image/helloWorld.d | 4 + .../2939_Ariovistus/Project/SConstruct_template | 14 ++-- .../2939_Ariovistus/Project/test/test1/SConscript | 4 + .../2939_Ariovistus/Project/test/test1/stuff.cpp | 4 + .../2939_Ariovistus/Project/test/test1/stuff.h | 4 + .../2939_Ariovistus/Project/test/test1/test1.cpp | 4 + .../2939_Ariovistus/Project/test/test1/test2.d | 4 + .../2940_Ariovistus/Project/SConstruct_template | 14 ++-- .../2940_Ariovistus/Project/test/test1/SConscript | 4 + .../2940_Ariovistus/Project/test/test1/stuff.cpp | 4 + .../2940_Ariovistus/Project/test/test1/stuff.h | 4 + .../2940_Ariovistus/Project/test/test1/test1.cpp | 4 + .../2940_Ariovistus/Project/test/test1/test2.d | 4 + test/D/Issues/2994/Project/SConstruct_template | 5 +- test/D/Issues/2994/Project/main.d | 4 + test/D/MixedDAndC/Image/SConstruct | 8 +- test/D/MixedDAndC/Image/cmod.c | 4 + test/D/MixedDAndC/Image/dmod.d | 4 + test/D/MixedDAndC/Image/proj.d | 4 + test/D/SharedObjects/Image/SConstruct_template | 4 +- test/D/SharedObjects/Image/code.d | 4 + test/Decider/MD5-winonly-fixture/SConstruct | 4 + test/Dir/DriveAbsPath/SConstruct | 34 +++++--- test/Dir/PyPackageDir/image/SConstruct | 4 + test/Docbook/basedir/htmlchunked/image/SConstruct | 5 ++ .../basedir/htmlchunked/image/SConstruct.cmd | 5 ++ test/Docbook/basedir/htmlhelp/image/SConstruct | 5 ++ test/Docbook/basedir/htmlhelp/image/SConstruct.cmd | 5 ++ test/Docbook/basedir/slideshtml/image/SConstruct | 5 ++ .../basedir/slideshtml/image/SConstruct.cmd | 5 ++ test/Docbook/basedir/slideshtml/image/xsltver.py | 4 + test/Docbook/basic/epub/image/SConstruct | 5 ++ test/Docbook/basic/epub/image/SConstruct.cmd | 5 ++ test/Docbook/basic/html/image/SConstruct | 5 ++ test/Docbook/basic/html/image/SConstruct.cmd | 5 ++ test/Docbook/basic/htmlchunked/image/SConstruct | 5 ++ .../Docbook/basic/htmlchunked/image/SConstruct.cmd | 5 ++ test/Docbook/basic/htmlhelp/image/SConstruct | 5 ++ test/Docbook/basic/htmlhelp/image/SConstruct.cmd | 5 ++ test/Docbook/basic/man/image/SConstruct | 5 ++ test/Docbook/basic/man/image/SConstruct.cmd | 5 ++ test/Docbook/basic/pdf/image/SConstruct | 5 ++ test/Docbook/basic/pdf/image/SConstruct.cmd | 5 ++ test/Docbook/basic/slideshtml/image/SConstruct | 11 ++- test/Docbook/basic/slideshtml/image/SConstruct.cmd | 11 ++- test/Docbook/basic/slideshtml/image/xsltver.py | 4 + test/Docbook/basic/slidespdf/image/SConstruct | 5 ++ test/Docbook/basic/slidespdf/image/SConstruct.cmd | 5 ++ test/Docbook/basic/xinclude/image/SConstruct | 5 ++ test/Docbook/basic/xslt/image/SConstruct | 8 +- test/Docbook/basic/xsltsubdir/image/SConstruct | 5 ++ .../basic/xsltsubdir/image/subdir/SConscript | 7 +- .../Docbook/dependencies/xinclude/image/SConstruct | 5 ++ test/Docbook/rootname/htmlchunked/image/SConstruct | 5 ++ test/Docbook/rootname/htmlhelp/image/SConstruct | 5 ++ test/Docbook/rootname/slideshtml/image/SConstruct | 5 ++ test/Docbook/rootname/slideshtml/image/xsltver.py | 4 + test/File/fixture/relpath/base/SConstruct | 26 ++++--- test/Fortran/fixture/myfortran.py | 4 + test/Fortran/fixture/myfortran_flags.py | 4 + test/Install/fixture/SConstruct-multi | 4 + test/Install/multi-dir/src/SConstruct | 4 + test/Java/Java-fixture/myjar.py | 4 + test/Java/Java-fixture/myjavac.py | 4 + test/Java/Java-fixture/myrmic.py | 4 + test/Java/java_version_image/SConstruct | 28 ++++--- .../java_version_image/com/sub/bar/Example4.java | 4 + .../java_version_image/com/sub/bar/Example5.java | 4 + .../java_version_image/com/sub/bar/Example6.java | 4 + .../java_version_image/com/sub/foo/Example1.java | 4 + .../java_version_image/com/sub/foo/Example2.java | 4 + .../java_version_image/com/sub/foo/Example3.java | 4 + test/Java/java_version_image/src1/Example7.java | 4 + test/Java/java_version_image/src2/Test.java | 4 + .../java_version_image/src4/NestedExample.java | 4 + test/Java/java_version_image/src5/TestSCons.java | 4 + test/Java/java_version_image/src6/TestSCons.java | 4 + test/LEX/lex_headerfile/spaced path/SConstruct | 6 +- test/LEX/lex_headerfile/spaced path/src/SConscript | 6 +- .../applelink_image/SConstruct_CurVers_CompatVers | 46 +++++++---- test/LINK/applelink_image/SConstruct_gh2580 | 4 + test/LINK/applelink_image/foo.c | 6 +- test/Libs/bug2903/SConstruct | 20 +++-- test/Libs/bug2903/SConstruct-libs | 12 ++- test/Libs/bug2903/lib.c | 4 + test/Libs/bug2903/main.c | 4 + test/MSVC/MSVC_BATCH-spaces-targetdir.py | 10 +-- test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct | 17 ++-- test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c | 6 +- test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c | 6 +- test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c | 6 +- test/MSVC/MSVC_USE_SCRIPT_ARGS-fixture/SConstruct | 4 + test/MSVC/VSWHERE-fixture/SConstruct | 5 ++ test/MSVC/msvc_fixture/SConstruct | 6 +- test/MSVC/msvc_fixture/StdAfx.cpp | 6 +- test/MSVC/msvc_fixture/StdAfx.h | 6 +- test/MSVC/msvc_fixture/foo.cpp | 6 +- test/MSVC/msvc_fixture/resource.h | 4 + test/MSVC/msvc_fixture/test.cpp | 6 +- test/MSVC/pch_gen/fixture/SConstruct | 36 +++++---- test/MinGW/bug_2799/SConstruct | 7 +- test/MinGW/bug_2799/module.c | 4 + test/MinGW/bug_2799/shlib.c | 4 + test/Parallel/failed-build/fixture/SConstruct | 15 +++- test/Parallel/failed-build/fixture/mycopy.py | 6 +- test/Parallel/failed-build/fixture/myfail.py | 6 +- test/Parallel/failed-build/fixture/teststate.py | 6 +- test/Progress/multi_target_fixture/SConstruct | 15 ++-- test/SConscript/fixture/SConstruct | 4 + test/SConscript/must_exist_deprecation.py | 2 +- test/Scanner/Python/SConstruct | 7 +- test/Scanner/Python/script.py | 4 + test/Scanner/Python/to_be_copied/__init__.py | 6 +- test/SideEffect/Issues/3013/files/SConscript | 4 + test/SideEffect/Issues/3013/files/SConstruct | 5 ++ test/SideEffect/Issues/3013/files/test.cpp | 4 + test/Subst/fixture/SConstruct.callable_exception | 8 +- .../fixture/SConstruct-tempfile-actionlist | 16 +++- test/TEMPFILE/fixture/SConstruct.tempfiledir | 5 ++ test/TaskMaster/bug_2811/fixture_dir/SConstruct | 13 ++-- test/TaskMaster/bug_2811/fixture_dir/mycopy.py | 4 + test/YACC/YACC-fixture/SConstruct_YACC_before | 9 ++- test/YACC/YACC-fixture/myyacc.py | 4 + test/YACC/YACCFLAGS-fixture/myyacc.py | 4 + test/fixture/SConstruct-check-valid-options | 2 + test/fixture/SConstruct_test_main.py | 4 + test/fixture/echo.py | 4 + test/fixture/mycompile.py | 4 + test/fixture/mygcc.py | 4 + test/fixture/mylex.py | 4 + test/fixture/mylink.py | 4 + test/fixture/myrewrite.py | 4 + test/fixture/no_msvc/no_msvcs_sconstruct.py | 14 +++- ..._msvcs_sconstruct_msvc_query_toolset_version.py | 14 +++- .../no_msvcs_sconstruct_msvc_sdk_versions.py | 14 +++- .../no_msvcs_sconstruct_msvc_toolset_versions.py | 14 +++- test/fixture/no_msvc/no_msvcs_sconstruct_tools.py | 11 ++- .../fixture/no_msvc/no_msvcs_sconstruct_version.py | 14 ++-- test/fixture/no_msvc/no_regs_sconstruct.py | 12 ++- .../python_scanner/curdir_reference/script.py | 4 + .../from_import_simple_package_module1.py | 4 + .../from_import_simple_package_module1_as.py | 4 + .../from_import_simple_package_module1_func.py | 6 +- .../from_import_simple_package_modules_no_space.py | 4 + ...rom_import_simple_package_modules_with_space.py | 4 + .../python_scanner/from_nested1_import_multiple.py | 6 +- .../import_simple_package_module1.py | 4 + .../import_simple_package_module1_as.py | 4 + test/fixture/python_scanner/imports_nested3.py | 4 + .../python_scanner/imports_simple_package.py | 4 + .../python_scanner/imports_unknown_files.py | 6 +- .../nested2/nested3/imports_grandparent_module.py | 4 + .../nested2/nested3/imports_parent_module.py | 4 + .../nested3/imports_parent_then_submodule.py | 4 + .../python_scanner/simple_package/module1.py | 6 +- test/fixture/test_main.c | 4 + test/fixture/wrapper.py | 4 + test/fixture/wrapper_with_args.py | 4 + test/ninja/ninja-fixture/bar.c | 4 + test/ninja/ninja-fixture/foo.c | 4 + test/ninja/ninja-fixture/gen_source.c | 4 + test/ninja/ninja-fixture/test1.c | 4 + test/ninja/ninja-fixture/test2.cpp | 6 +- test/ninja/ninja-fixture/test_impl.c | 4 + test/ninja/ninja_test_sconscripts/ninja_conftest | 9 ++- .../sconstruct_control_c_ninja | 4 + .../sconstruct_default_targets | 6 +- .../sconstruct_force_scons_callback | 4 + .../sconstruct_generate_and_build | 4 + .../sconstruct_generate_and_build_cxx | 4 + .../sconstruct_generated_sources_alias | 6 +- .../sconstruct_mingw_command_generator_action | 6 +- .../sconstruct_mingw_depfile_format | 4 + .../sconstruct_ninja_command_line | 4 + .../sconstruct_ninja_determinism | 4 + .../sconstruct_no_for_sig_subst | 4 + .../sconstruct_response_file | 6 +- test/option/fixture/SConstruct__experimental | 4 + test/option/fixture/SConstruct__taskmastertrace | 4 + test/option/hash-format/SConstruct | 4 + test/option/hash-format/build.py | 6 +- .../convenience-functions/image/SConstruct | 5 ++ test/packaging/rpm/src/main.c | 4 + test/packaging/sandbox-test/SConstruct | 30 +++++--- test/textfile/fixture/SConstruct | 13 +++- test/textfile/fixture/SConstruct.2 | 13 +++- test/textfile/fixture/SConstruct.issue-3540 | 15 ++-- test/textfile/fixture/SConstruct.issue-3550 | 4 + test/textfile/fixture/SConstruct.issue-4037 | 13 ++-- .../image/Libs/tools_example/Toolpath_TestTool1.py | 5 ++ .../tools_example/Toolpath_TestTool2/__init__.py | 5 ++ .../tools_example/subdir1/Toolpath_TestTool1_1.py | 5 ++ .../subdir1/Toolpath_TestTool1_2/__init__.py | 5 ++ .../subdir1/subdir2/Toolpath_TestTool2_1.py | 5 ++ .../subdir2/Toolpath_TestTool2_2/__init__.py | 5 ++ test/toolpath/nested/image/SConstruct | 90 ++++++++++++---------- .../site_scons/site_tools/Toolpath_TestTool1.py | 5 ++ .../site_tools/Toolpath_TestTool2/__init__.py | 5 ++ .../site_tools/subdir1/Toolpath_TestTool1_1.py | 5 ++ .../subdir1/Toolpath_TestTool1_2/__init__.py | 5 ++ .../subdir1/subdir2/Toolpath_TestTool2_1.py | 5 ++ .../subdir2/Toolpath_TestTool2_2/__init__.py | 5 ++ test/toolpath/relative_import/image/SConstruct | 15 ++-- .../image/tools/TestTool1/TestTool1_1.py | 5 ++ .../tools/TestTool1/TestTool1_2/TestTool1_2_1.py | 5 ++ .../TestTool1_2/TestTool1_2_2/__init__.py | 5 ++ .../image/tools/TestTool1/TestTool1_2/__init__.py | 5 ++ .../image/tools/TestTool1/__init__.py | 5 ++ 274 files changed, 1498 insertions(+), 350 deletions(-) diff --git a/test/AS/fixture/myas.py b/test/AS/fixture/myas.py index a348ace..b3d441c 100644 --- a/test/AS/fixture/myas.py +++ b/test/AS/fixture/myas.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys diff --git a/test/AS/fixture/myas_args.py b/test/AS/fixture/myas_args.py index 7a5e6fa..0249a9e 100644 --- a/test/AS/fixture/myas_args.py +++ b/test/AS/fixture/myas_args.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys diff --git a/test/Actions/addpost-link-fixture/strip.py b/test/Actions/addpost-link-fixture/strip.py index 88242f2..ad21dbc 100644 --- a/test/Actions/addpost-link-fixture/strip.py +++ b/test/Actions/addpost-link-fixture/strip.py @@ -1,2 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys + print("strip.py: %s" % " ".join(sys.argv[1:])) diff --git a/test/Actions/addpost-link-fixture/test1.c b/test/Actions/addpost-link-fixture/test1.c index 333f5c7..585021f 100644 --- a/test/Actions/addpost-link-fixture/test1.c +++ b/test/Actions/addpost-link-fixture/test1.c @@ -1,4 +1,9 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + extern void test_lib_fn(); + int main(int argc, char **argv) { test_lib_fn(); return 0; diff --git a/test/Actions/addpost-link-fixture/test_lib.c b/test/Actions/addpost-link-fixture/test_lib.c index 0ac1076..8bb0e60 100644 --- a/test/Actions/addpost-link-fixture/test_lib.c +++ b/test/Actions/addpost-link-fixture/test_lib.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include void test_lib_fn() { diff --git a/test/Actions/append-fixture/foo.c b/test/Actions/append-fixture/foo.c index e6428b5..83ab6e1 100644 --- a/test/Actions/append-fixture/foo.c +++ b/test/Actions/append-fixture/foo.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include int main(void) diff --git a/test/Actions/pre-post-fixture/work1/bar.c b/test/Actions/pre-post-fixture/work1/bar.c index eb3fd78..1ea20c1 100644 --- a/test/Actions/pre-post-fixture/work1/bar.c +++ b/test/Actions/pre-post-fixture/work1/bar.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include int main(void) diff --git a/test/Actions/pre-post-fixture/work1/foo.c b/test/Actions/pre-post-fixture/work1/foo.c index 32f2a3e..80d2e32 100644 --- a/test/Actions/pre-post-fixture/work1/foo.c +++ b/test/Actions/pre-post-fixture/work1/foo.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include int main(void) diff --git a/test/Actions/pre-post-fixture/work2/SConstruct b/test/Actions/pre-post-fixture/work2/SConstruct index e0af0ee..347dcbe 100644 --- a/test/Actions/pre-post-fixture/work2/SConstruct +++ b/test/Actions/pre-post-fixture/work2/SConstruct @@ -1,13 +1,19 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def b(target, source, env): with open(str(target[0]), 'wb') as f: f.write((env['X'] + '\n').encode()) + +DefaultEnvironment(tools=[]) env1 = Environment(X='111', tools=[]) env2 = Environment(X='222', tools=[]) -B = Builder(action = b, env = env1, multi=1) +B = Builder(action=b, env=env1, multi=1) print("B =", B) print("B.env =", B.env) -env1.Append(BUILDERS = {'B' : B}) -env2.Append(BUILDERS = {'B' : B}) +env1.Append(BUILDERS={'B': B}) +env2.Append(BUILDERS={'B': B}) env3 = env1.Clone(X='333') print("env1 =", env1) print("env2 =", env2) @@ -15,8 +21,10 @@ print("env3 =", env3) f1 = env1.B(File('file1.out'), []) f2 = env2.B('file2.out', []) f3 = env3.B('file3.out', []) + def do_nothing(env, target, source): pass + AddPreAction(f2[0], do_nothing) AddPostAction(f3[0], do_nothing) print("f1[0].builder =", f1[0].builder) diff --git a/test/Actions/pre-post-fixture/work3/SConstruct b/test/Actions/pre-post-fixture/work3/SConstruct index e0aa257..54f537a 100644 --- a/test/Actions/pre-post-fixture/work3/SConstruct +++ b/test/Actions/pre-post-fixture/work3/SConstruct @@ -1,10 +1,18 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def pre(target, source, env): pass + def post(target, source, env): pass + def build(target, source, env): with open(str(target[0]), 'wb') as f: f.write(b'build()\n') + +DefaultEnvironment(tools=[]) env = Environment(tools=[]) AddPreAction('dir', pre) AddPostAction('dir', post) diff --git a/test/Actions/pre-post-fixture/work4/build.py b/test/Actions/pre-post-fixture/work4/build.py index 390c8b9..2758b30 100644 --- a/test/Actions/pre-post-fixture/work4/build.py +++ b/test/Actions/pre-post-fixture/work4/build.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys + with open(sys.argv[1], 'wb') as outfp: for f in sys.argv[2:]: with open(f, 'rb') as infp: diff --git a/test/Actions/pre-post.py b/test/Actions/pre-post.py index ce8cbdc..ac6a96f 100644 --- a/test/Actions/pre-post.py +++ b/test/Actions/pre-post.py @@ -43,7 +43,7 @@ test.write(['work1', 'SConstruct'], """ import os.path import stat -# DefaultEnvironment(tools=[]) +DefaultEnvironment(tools=[]) env = Environment(XXX='bar%(_exe)s') def before(env, target, source): diff --git a/test/Actions/subst_shell_env-fixture/SConstruct b/test/Actions/subst_shell_env-fixture/SConstruct index 5ba822e..f6d5dc0 100644 --- a/test/Actions/subst_shell_env-fixture/SConstruct +++ b/test/Actions/subst_shell_env-fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys def custom_environment_expansion1(env, target, source, shell_env): @@ -16,6 +20,7 @@ def expand_this_generator(env, target, source, for_signature): def expand_that_generator(env, target, source, for_signature): return str(target[0]) + "_is_from_expansion" +DefaultEnvironment(tools=[]) env = Environment(tools=['textfile']) env['SHELL_ENV_GENERATORS'] = [custom_environment_expansion1, custom_environment_expansion2] diff --git a/test/Actions/unicode-signature-fixture/SConstruct b/test/Actions/unicode-signature-fixture/SConstruct index 4d466e1..95c969d 100644 --- a/test/Actions/unicode-signature-fixture/SConstruct +++ b/test/Actions/unicode-signature-fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + fnode = File(u'foo.txt') def funcact(target, source, env): @@ -7,6 +11,6 @@ def funcact(target, source, env): pass return 0 +DefaultEnvironment(tools=[]) env = Environment() - env.Command(fnode, [], ["echo $TARGET", funcact]) diff --git a/test/Batch/SConstruct_changed_sources_alwaysBuild b/test/Batch/SConstruct_changed_sources_alwaysBuild index dea7908..e6ae974 100644 --- a/test/Batch/SConstruct_changed_sources_alwaysBuild +++ b/test/Batch/SConstruct_changed_sources_alwaysBuild @@ -1,8 +1,10 @@ -# Testcase for tigris bug 2622 +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +"""Testcase for tigris bug 2622""" obj = Object('changed_sources_main.cpp') AlwaysBuild(obj) - program = Program('test', source=[obj]) - Default(program) diff --git a/test/Batch/changed_sources_main.cpp b/test/Batch/changed_sources_main.cpp index 810625a..886d0bc 100644 --- a/test/Batch/changed_sources_main.cpp +++ b/test/Batch/changed_sources_main.cpp @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation #include diff --git a/test/CC/CC-fixture/bar.c b/test/CC/CC-fixture/bar.c index de1e6e5..2ebfa66 100644 --- a/test/CC/CC-fixture/bar.c +++ b/test/CC/CC-fixture/bar.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/CC/CC-fixture/foo.c b/test/CC/CC-fixture/foo.c index de1e6e5..2ebfa66 100644 --- a/test/CC/CC-fixture/foo.c +++ b/test/CC/CC-fixture/foo.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/CC/CC-fixture/mycc.py b/test/CC/CC-fixture/mycc.py index eb11c87..0a0da59 100644 --- a/test/CC/CC-fixture/mycc.py +++ b/test/CC/CC-fixture/mycc.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Phony cc command for testing SCons. diff --git a/test/CC/CCVERSION-fixture/versioned.py b/test/CC/CCVERSION-fixture/versioned.py index 33dc574..b0f0978 100644 --- a/test/CC/CCVERSION-fixture/versioned.py +++ b/test/CC/CCVERSION-fixture/versioned.py @@ -1,5 +1,10 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import subprocess import sys + if '-dumpversion' in sys.argv: print('3.9.9') sys.exit(0) diff --git a/test/CC/gcc-non-utf8-fixture/gcc-non-utf8.py b/test/CC/gcc-non-utf8-fixture/gcc-non-utf8.py index 292e5cb..f42f957 100644 --- a/test/CC/gcc-non-utf8-fixture/gcc-non-utf8.py +++ b/test/CC/gcc-non-utf8-fixture/gcc-non-utf8.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys if __name__ == '__main__': diff --git a/test/CXX/CXX-fixture/myc++.py b/test/CXX/CXX-fixture/myc++.py index d369f61..65613c3 100644 --- a/test/CXX/CXX-fixture/myc++.py +++ b/test/CXX/CXX-fixture/myc++.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Phony c++ command for testing SCons. diff --git a/test/CacheDir/CACHEDIR_CLASS_fixture/SConstruct b/test/CacheDir/CACHEDIR_CLASS_fixture/SConstruct index 6ec40c6..db07dc6 100644 --- a/test/CacheDir/CACHEDIR_CLASS_fixture/SConstruct +++ b/test/CacheDir/CACHEDIR_CLASS_fixture/SConstruct @@ -1,12 +1,17 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons -class CustomCacheDir(SCons.CacheDir.CacheDir): +class CustomCacheDir(SCons.CacheDir.CacheDir): @classmethod def copy_to_cache(cls, env, src, dst): print("MY_CUSTOM_CACHEDIR_CLASS") super().copy_to_cache(env, src, dst) +DefaultEnvironment(tools=[]) env = Environment(tools=[]) env['CACHEDIR_CLASS'] = CustomCacheDir env.CacheDir('cache') -env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) \ No newline at end of file +env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/CacheDir/custom_cachedir_fixture/SConstruct b/test/CacheDir/custom_cachedir_fixture/SConstruct index 6389999..8d9c478 100644 --- a/test/CacheDir/custom_cachedir_fixture/SConstruct +++ b/test/CacheDir/custom_cachedir_fixture/SConstruct @@ -1,11 +1,16 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons -class CustomCacheDir(SCons.CacheDir.CacheDir): +class CustomCacheDir(SCons.CacheDir.CacheDir): @classmethod def copy_to_cache(cls, env, src, dst): print("MY_CUSTOM_CACHEDIR_CLASS") super().copy_to_cache(env, src, dst) +DefaultEnvironment(tools=[]) env = Environment(tools=[]) env.CacheDir('cache', CustomCacheDir) -env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) \ No newline at end of file +env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/CacheDir/double_cachedir_fixture/SConstruct b/test/CacheDir/double_cachedir_fixture/SConstruct index 322e286..34c27b0 100644 --- a/test/CacheDir/double_cachedir_fixture/SConstruct +++ b/test/CacheDir/double_cachedir_fixture/SConstruct @@ -1,6 +1,10 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons -class CustomCacheDir1(SCons.CacheDir.CacheDir): +class CustomCacheDir1(SCons.CacheDir.CacheDir): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) print("INSTANCIATED %s" % str(type(self).__name__)) @@ -11,7 +15,6 @@ class CustomCacheDir1(SCons.CacheDir.CacheDir): super().copy_to_cache(env, src, dst) class CustomCacheDir2(SCons.CacheDir.CacheDir): - def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) print("INSTANCIATED %s" % str(type(self).__name__)) @@ -21,6 +24,7 @@ class CustomCacheDir2(SCons.CacheDir.CacheDir): print("MY_CUSTOM_CACHEDIR_CLASS2") super().copy_to_cache(env, src, dst) +DefaultEnvironment(tools=[]) env = Environment(tools=[]) env.CacheDir('cache1', CustomCacheDir1) env.CacheDir('cache2', CustomCacheDir2) diff --git a/test/CacheDir/invalid_custom_cachedir_fixture/SConstruct b/test/CacheDir/invalid_custom_cachedir_fixture/SConstruct index ad467e0..78f1bc6 100644 --- a/test/CacheDir/invalid_custom_cachedir_fixture/SConstruct +++ b/test/CacheDir/invalid_custom_cachedir_fixture/SConstruct @@ -1,6 +1,11 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + class CustomCacheDir: pass +DefaultEnvironment(tools=[]) env = Environment(tools=[]) env.CacheDir('cache', CustomCacheDir) -env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) \ No newline at end of file +env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE')) diff --git a/test/CacheDir/value_dependencies/SConstruct b/test/CacheDir/value_dependencies/SConstruct index 7b7e596..55c22ff 100644 --- a/test/CacheDir/value_dependencies/SConstruct +++ b/test/CacheDir/value_dependencies/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons.Node CacheDir('cache') @@ -7,8 +11,7 @@ def b(target, source, env): pass def scan(node, env, path): - # Have the node depend on a directory, which depends on an instance of - # SCons.Node.Python.Value. + """Have the node depend on a directory, which depends on a Value node.""" sample_dir = env.fs.Dir('dir2') env.Depends(sample_dir, env.Value('c')) return [sample_dir, env.Value('d'), env.Value(b'\x03\x0F', name='name3')] @@ -16,17 +19,16 @@ def scan(node, env, path): scanner = Scanner(function=scan, node_class=SCons.Node.Node) builder = Builder(action=b, source_scanner=scanner) +DefaultEnvironment(tools=[]) env = Environment() env.Append(BUILDERS={'B': builder}) # Create a node and a directory that each depend on an instance of # SCons.Node.Python.Value. sample_dir = env.fs.Dir('dir1') -env.Depends(sample_dir, - [env.Value('a'), env.Value(b'\x01\x0F', name='name1')]) +env.Depends(sample_dir, [env.Value('a'), env.Value(b'\x01\x0F', name='name1')]) sample_file = env.fs.File('testfile') -env.Depends(sample_file, - [env.Value('b'), env.Value(b'\x02\x0F', name='name2')]) +env.Depends(sample_file, [env.Value('b'), env.Value(b'\x02\x0F', name='name2')]) env.B(target='File1.out', source=[sample_dir, sample_file]) diff --git a/test/CompilationDatabase/fixture/SConstruct b/test/CompilationDatabase/fixture/SConstruct index bd2f780..47d35fb 100644 --- a/test/CompilationDatabase/fixture/SConstruct +++ b/test/CompilationDatabase/fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys DefaultEnvironment(tools=[]) diff --git a/test/CompilationDatabase/fixture/SConstruct_tempfile b/test/CompilationDatabase/fixture/SConstruct_tempfile index 6b95977..4bc5c14 100644 --- a/test/CompilationDatabase/fixture/SConstruct_tempfile +++ b/test/CompilationDatabase/fixture/SConstruct_tempfile @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys DefaultEnvironment(tools=[]) diff --git a/test/CompilationDatabase/fixture/SConstruct_variant b/test/CompilationDatabase/fixture/SConstruct_variant index ea461fb..eaf19e8 100644 --- a/test/CompilationDatabase/fixture/SConstruct_variant +++ b/test/CompilationDatabase/fixture/SConstruct_variant @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys DefaultEnvironment(tools=[]) diff --git a/test/Configure/conftest_source_file/SConstruct b/test/Configure/conftest_source_file/SConstruct index dd8d28e..521afc1 100644 --- a/test/Configure/conftest_source_file/SConstruct +++ b/test/Configure/conftest_source_file/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) env = Environment() env.Append(CPPPATH=['.']) @@ -5,4 +9,4 @@ conf1 = Configure(env) conf1.CheckHeader("header1.h") conf1.CheckHeader("header3.h") conf1.Finish() -env.Program('out', 'main.c') \ No newline at end of file +env.Program('out', 'main.c') diff --git a/test/Configure/conftest_source_file/header1.h b/test/Configure/conftest_source_file/header1.h index 85dcd68..336f921 100644 --- a/test/Configure/conftest_source_file/header1.h +++ b/test/Configure/conftest_source_file/header1.h @@ -1,2 +1,6 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #pragma once -#include "header2.h" \ No newline at end of file +#include "header2.h" diff --git a/test/Configure/conftest_source_file/header2.h b/test/Configure/conftest_source_file/header2.h index 2cf8e90..90171bd 100644 --- a/test/Configure/conftest_source_file/header2.h +++ b/test/Configure/conftest_source_file/header2.h @@ -1,2 +1,6 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #pragma once -int test_header = 1; \ No newline at end of file +int test_header = 1; diff --git a/test/Configure/conftest_source_file/header3.h b/test/Configure/conftest_source_file/header3.h index dc4359e..68d9765 100644 --- a/test/Configure/conftest_source_file/header3.h +++ b/test/Configure/conftest_source_file/header3.h @@ -1,2 +1,6 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #pragma once -int test_header = 3; \ No newline at end of file +int test_header = 3; diff --git a/test/Configure/conftest_source_file/main.c b/test/Configure/conftest_source_file/main.c index a9f9570..e6ef776 100644 --- a/test/Configure/conftest_source_file/main.c +++ b/test/Configure/conftest_source_file/main.c @@ -1,2 +1,6 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "header1.h" -int main(){return 0;} \ No newline at end of file +int main(){return 0;} diff --git a/test/Configure/fixture/SConstruct.issue-2906 b/test/Configure/fixture/SConstruct.issue-2906 index 7763653..87a4d9e 100644 --- a/test/Configure/fixture/SConstruct.issue-2906 +++ b/test/Configure/fixture/SConstruct.issue-2906 @@ -1,5 +1,10 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +# +DefaultEnvironment(tools=[]) env = Environment() conf1 = Configure(env) env2 = Environment() # Error right here. You can't have two configure contexts in flight at the same time. -conf2 = Configure(env2) \ No newline at end of file +conf2 = Configure(env2) diff --git a/test/Configure/is_conftest/fixture/SConstruct b/test/Configure/is_conftest/fixture/SConstruct index b0d4288..5494ea5 100644 --- a/test/Configure/is_conftest/fixture/SConstruct +++ b/test/Configure/is_conftest/fixture/SConstruct @@ -1,9 +1,11 @@ -""" -Test the nodes are created as conftest nodes in configure tests. -""" +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +"""Test the nodes are created as conftest nodes in configure tests.""" import sys -DefaultEnvironment(tools=[]) +DefaultEnvironment(tools=[]) env = Environment() conf = Configure(env) diff --git a/test/Configure/issue-2906-useful-duplicate-configure-message.py b/test/Configure/issue-2906-useful-duplicate-configure-message.py index 94c55c0..8fe3f8f 100644 --- a/test/Configure/issue-2906-useful-duplicate-configure-message.py +++ b/test/Configure/issue-2906-useful-duplicate-configure-message.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,9 +22,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Verify useful error message when you create a second Configure context without @@ -44,7 +43,7 @@ expected_stdout = "scons: Reading SConscript files ...\n" expected_stderr = """ scons: *** Configure() called while another Configure() exists. Please call .Finish() before creating and second Configure() context -File "%s", line 5, in \n"""%test_SConstruct_path +File "%s", line 10, in \n"""%test_SConstruct_path test.run(stderr=expected_stderr, stdout=expected_stdout, status=2) test.pass_test() diff --git a/test/Configure/issue-3469/fixture/SConstruct b/test/Configure/issue-3469/fixture/SConstruct index ae1fb30..93d91a7 100644 --- a/test/Configure/issue-3469/fixture/SConstruct +++ b/test/Configure/issue-3469/fixture/SConstruct @@ -8,7 +8,6 @@ Github issue #3469 """ DefaultEnvironment(tools=[]) - vars = Variables() vars.Add(BoolVariable('SKIP', 'Skip Middle Conf test', False)) env = Environment(variables=vars) diff --git a/test/D/AllAtOnce/Image/SConstruct_template b/test/D/AllAtOnce/Image/SConstruct_template index 89d058e..0faf715 100644 --- a/test/D/AllAtOnce/Image/SConstruct_template +++ b/test/D/AllAtOnce/Image/SConstruct_template @@ -1,13 +1,19 @@ -# -*- coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os +DefaultEnvironment(tools=[]) environment = Environment( tools=['{}', 'link'], ) -environment.ProgramAllAtOnce('project', [ -'main.d', -'amod.d', -'bmod.d', -]) +environment.ProgramAllAtOnce( + 'project', + [ + 'main.d', + 'amod.d', + 'bmod.d', + ], +) diff --git a/test/D/AllAtOnce/Image/amod.d b/test/D/AllAtOnce/Image/amod.d index a32aa75..0da2a0e 100644 --- a/test/D/AllAtOnce/Image/amod.d +++ b/test/D/AllAtOnce/Image/amod.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; void print_message() { diff --git a/test/D/AllAtOnce/Image/bmod.d b/test/D/AllAtOnce/Image/bmod.d index e4c1e1b..ad99d39 100644 --- a/test/D/AllAtOnce/Image/bmod.d +++ b/test/D/AllAtOnce/Image/bmod.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + int calculate_value() { return 42; } diff --git a/test/D/AllAtOnce/Image/main.d b/test/D/AllAtOnce/Image/main.d index 8b99458..f892525 100644 --- a/test/D/AllAtOnce/Image/main.d +++ b/test/D/AllAtOnce/Image/main.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio: writefln; import amod: print_message; import bmod: calculate_value; diff --git a/test/D/CoreScanner/Image/SConstruct_template b/test/D/CoreScanner/Image/SConstruct_template index e91343b..b67f043 100644 --- a/test/D/CoreScanner/Image/SConstruct_template +++ b/test/D/CoreScanner/Image/SConstruct_template @@ -1,8 +1,10 @@ -# -*- mode:python; coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -environment = Environment( - tools=['link', '{}']) +DefaultEnvironment(tools=[]) +environment = Environment(tools=['link', '{}']) environment.Program('test1.d') environment.Program('test2.d') diff --git a/test/D/CoreScanner/Image/ignored.d b/test/D/CoreScanner/Image/ignored.d index 5b54a07..bcff3b7 100644 --- a/test/D/CoreScanner/Image/ignored.d +++ b/test/D/CoreScanner/Image/ignored.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module ignored; int something; diff --git a/test/D/CoreScanner/Image/module1.d b/test/D/CoreScanner/Image/module1.d index 487c358..1423a0a 100644 --- a/test/D/CoreScanner/Image/module1.d +++ b/test/D/CoreScanner/Image/module1.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module module1; int something; diff --git a/test/D/CoreScanner/Image/module2.d b/test/D/CoreScanner/Image/module2.d index 198fb74..41f1aab 100644 --- a/test/D/CoreScanner/Image/module2.d +++ b/test/D/CoreScanner/Image/module2.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module module2; int something; diff --git a/test/D/CoreScanner/Image/p/ignored.d b/test/D/CoreScanner/Image/p/ignored.d index 43d2bd8..c01e057 100644 --- a/test/D/CoreScanner/Image/p/ignored.d +++ b/test/D/CoreScanner/Image/p/ignored.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module p.ignored; int something; diff --git a/test/D/CoreScanner/Image/p/submodule1.d b/test/D/CoreScanner/Image/p/submodule1.d index 1ec0369..c4e1be4 100644 --- a/test/D/CoreScanner/Image/p/submodule1.d +++ b/test/D/CoreScanner/Image/p/submodule1.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module p.submodule1; int something; diff --git a/test/D/CoreScanner/Image/p/submodule2.d b/test/D/CoreScanner/Image/p/submodule2.d index 57a2825..f59116c 100644 --- a/test/D/CoreScanner/Image/p/submodule2.d +++ b/test/D/CoreScanner/Image/p/submodule2.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module p.submodule2; int something; diff --git a/test/D/CoreScanner/Image/test1.d b/test/D/CoreScanner/Image/test1.d index d386d97..4ca6799 100644 --- a/test/D/CoreScanner/Image/test1.d +++ b/test/D/CoreScanner/Image/test1.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import module1; import module2; import module3; diff --git a/test/D/CoreScanner/Image/test2.d b/test/D/CoreScanner/Image/test2.d index f880d2f..dd43cfa 100644 --- a/test/D/CoreScanner/Image/test2.d +++ b/test/D/CoreScanner/Image/test2.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import module1, module2, diff --git a/test/D/HSTeoh/ArLibIssue/SConstruct_template b/test/D/HSTeoh/ArLibIssue/SConstruct_template index b17847a..a39c228 100644 --- a/test/D/HSTeoh/ArLibIssue/SConstruct_template +++ b/test/D/HSTeoh/ArLibIssue/SConstruct_template @@ -1,6 +1,10 @@ -env = Environment({}) +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd +DefaultEnvironment(tools=[]) +env = Environment({}) +env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd env.StaticLibrary('mylib', ['a.d', 'b.d']) diff --git a/test/D/HSTeoh/LibCompileOptions/SConstruct_template b/test/D/HSTeoh/LibCompileOptions/SConstruct_template index 1489624..b2fde06 100644 --- a/test/D/HSTeoh/LibCompileOptions/SConstruct_template +++ b/test/D/HSTeoh/LibCompileOptions/SConstruct_template @@ -1,12 +1,12 @@ -env = Environment({}) +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd +DefaultEnvironment(tools=[]) +env = Environment({}) +env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd env.Library('mylib', 'mylib.d') - -prog_env = env.Clone( - LIBS = ['mylib'], - LIBPATH = '#' - ) +prog_env = env.Clone(LIBS=['mylib'], LIBPATH='#') prog_env.Program('prog', 'prog.d') diff --git a/test/D/HSTeoh/LibCompileOptions/prog.d b/test/D/HSTeoh/LibCompileOptions/prog.d index 33c14ce..079a8df 100644 --- a/test/D/HSTeoh/LibCompileOptions/prog.d +++ b/test/D/HSTeoh/LibCompileOptions/prog.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + int main() { return 0; } diff --git a/test/D/HSTeoh/LinkingProblem/SConstruct_template b/test/D/HSTeoh/LinkingProblem/SConstruct_template index 2c53b54..993f14c 100644 --- a/test/D/HSTeoh/LinkingProblem/SConstruct_template +++ b/test/D/HSTeoh/LinkingProblem/SConstruct_template @@ -1,20 +1,17 @@ -# -*- mode:python; coding=utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -environment = Environment( - tools = ['cc', '{}', 'link'], - LIBS = ['ncurses']) - +DefaultEnvironment(tools=[]) +environment = Environment(tools=['cc', '{}', 'link'], LIBS=['ncurses']) environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd - environment.Object('ncurs_impl.o', 'ncurs_impl.c') - environment.Program('prog', Split(""" prog.d ncurs_impl.o """)) - environment.Program('cprog', Split(""" cprog.c ncurs_impl.o diff --git a/test/D/HSTeoh/LinkingProblem/cprog.c b/test/D/HSTeoh/LinkingProblem/cprog.c index 674fd96..a70ea29 100644 --- a/test/D/HSTeoh/LinkingProblem/cprog.c +++ b/test/D/HSTeoh/LinkingProblem/cprog.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + extern void ncurs_init(); extern void ncurs_cleanup(); diff --git a/test/D/HSTeoh/LinkingProblem/ncurs_impl.c b/test/D/HSTeoh/LinkingProblem/ncurs_impl.c index 3ca6dd3..93e8276 100644 --- a/test/D/HSTeoh/LinkingProblem/ncurs_impl.c +++ b/test/D/HSTeoh/LinkingProblem/ncurs_impl.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + /* Ncurses wrappers */ #include diff --git a/test/D/HSTeoh/LinkingProblem/prog.d b/test/D/HSTeoh/LinkingProblem/prog.d index 1337210..72d4099 100644 --- a/test/D/HSTeoh/LinkingProblem/prog.d +++ b/test/D/HSTeoh/LinkingProblem/prog.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + /* * Simple D program that links to ncurses via a C wrapping file. */ diff --git a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/SConstruct_template b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/SConstruct_template index 118a7b2..1c75620 100644 --- a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/SConstruct_template +++ b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/SConstruct_template @@ -1,12 +1,17 @@ -# -*- mode:python; coding=utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os +DefaultEnvironment(tools=[]) environment = Environment( tools=['link', '{}'], - # It might be thought that a single string can contain multiple options space separated. Actually this - # is deemed to be a single option, so leads to an error. - DFLAGS = '-m64 -O') + # It might be thought that a single string can contain multiple + # options space separated. Actually this is deemed to be a single option, + # so leads to an error. + DFLAGS='-m64 -O', +) environment.Program('proj', Split(""" proj.d diff --git a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/cmod.c b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/cmod.c index 41c57f3..517c7e3 100644 --- a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/cmod.c +++ b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/cmod.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + /* This is a sample C module. */ int csqr(int arg) { diff --git a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/mod1.d b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/mod1.d index 5f61802..165514b 100644 --- a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/mod1.d +++ b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/mod1.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module mod1; import std.stdio; diff --git a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/proj.d b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/proj.d index e97f9dd..64d360a 100644 --- a/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/proj.d +++ b/test/D/HSTeoh/SingleStringCannotBeMultipleOptions/proj.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; import mod1; diff --git a/test/D/HelloWorld/CompileAndLinkOneStep/Image/SConstruct_template b/test/D/HelloWorld/CompileAndLinkOneStep/Image/SConstruct_template index e2e7439..a6a9b80 100644 --- a/test/D/HelloWorld/CompileAndLinkOneStep/Image/SConstruct_template +++ b/test/D/HelloWorld/CompileAndLinkOneStep/Image/SConstruct_template @@ -1,8 +1,9 @@ -# -*- mode:python; coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -environment = Environment( - tools=['link', '{}']) - +DefaultEnvironment(tools=[]) +environment = Environment(tools=['link', '{}']) environment.Program('helloWorld.d') diff --git a/test/D/HelloWorld/CompileAndLinkOneStep/Image/helloWorld.d b/test/D/HelloWorld/CompileAndLinkOneStep/Image/helloWorld.d index 4d95b24..e9bc225 100644 --- a/test/D/HelloWorld/CompileAndLinkOneStep/Image/helloWorld.d +++ b/test/D/HelloWorld/CompileAndLinkOneStep/Image/helloWorld.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; int main(immutable string[] args) { diff --git a/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/SConstruct_template b/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/SConstruct_template index b38a9f0..3fa6860 100644 --- a/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/SConstruct_template +++ b/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/SConstruct_template @@ -1,10 +1,10 @@ -# -*- mode:python; coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -environment = Environment( - tools=['link', '{}']) - +DefaultEnvironment(tools=[]) +environment = Environment(tools=['link', '{}']) objects = environment.Object('helloWorld.d') - environment.Program('helloWorld', objects) diff --git a/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/helloWorld.d b/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/helloWorld.d index 4d95b24..e9bc225 100644 --- a/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/helloWorld.d +++ b/test/D/HelloWorld/CompileThenLinkTwoSteps/Image/helloWorld.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; int main(immutable string[] args) { diff --git a/test/D/Issues/2939_Ariovistus/Project/SConstruct_template b/test/D/Issues/2939_Ariovistus/Project/SConstruct_template index c78ba96..9202c45 100644 --- a/test/D/Issues/2939_Ariovistus/Project/SConstruct_template +++ b/test/D/Issues/2939_Ariovistus/Project/SConstruct_template @@ -1,12 +1,12 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +import os from os.path import join +DefaultEnvironment(tools=[]) environment = Environment({}) - -import os environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd - Export('environment') - -environment.SConscript([ - join("test","test1", "SConscript"), -]); +environment.SConscript([join("test","test1", "SConscript")]); diff --git a/test/D/Issues/2939_Ariovistus/Project/test/test1/SConscript b/test/D/Issues/2939_Ariovistus/Project/test/test1/SConscript index 53a1ca0..4b0d579 100644 --- a/test/D/Issues/2939_Ariovistus/Project/test/test1/SConscript +++ b/test/D/Issues/2939_Ariovistus/Project/test/test1/SConscript @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + Import('environment') env = Environment() diff --git a/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.cpp b/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.cpp index 2970549..a19fb34 100644 --- a/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.cpp +++ b/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.cpp @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "stuff.h" X::X() { diff --git a/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.h b/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.h index 863c330..6dc578d 100644 --- a/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.h +++ b/test/D/Issues/2939_Ariovistus/Project/test/test1/stuff.h @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + class X { public: diff --git a/test/D/Issues/2939_Ariovistus/Project/test/test1/test1.cpp b/test/D/Issues/2939_Ariovistus/Project/test/test1/test1.cpp index f4d7208..b995685 100644 --- a/test/D/Issues/2939_Ariovistus/Project/test/test1/test1.cpp +++ b/test/D/Issues/2939_Ariovistus/Project/test/test1/test1.cpp @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "stuff.h" int main() { diff --git a/test/D/Issues/2939_Ariovistus/Project/test/test1/test2.d b/test/D/Issues/2939_Ariovistus/Project/test/test1/test2.d index 4fbfa4d..07179c1 100644 --- a/test/D/Issues/2939_Ariovistus/Project/test/test1/test2.d +++ b/test/D/Issues/2939_Ariovistus/Project/test/test1/test2.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; struct X { diff --git a/test/D/Issues/2940_Ariovistus/Project/SConstruct_template b/test/D/Issues/2940_Ariovistus/Project/SConstruct_template index c78ba96..00fd2b7 100644 --- a/test/D/Issues/2940_Ariovistus/Project/SConstruct_template +++ b/test/D/Issues/2940_Ariovistus/Project/SConstruct_template @@ -1,12 +1,12 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +import os from os.path import join +DefaultEnvironment(tools=[]) environment = Environment({}) - -import os environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd - Export('environment') - -environment.SConscript([ - join("test","test1", "SConscript"), -]); +environment.SConscript([join("test","test1", "SConscript")]) diff --git a/test/D/Issues/2940_Ariovistus/Project/test/test1/SConscript b/test/D/Issues/2940_Ariovistus/Project/test/test1/SConscript index 45e517a..00aaf14 100644 --- a/test/D/Issues/2940_Ariovistus/Project/test/test1/SConscript +++ b/test/D/Issues/2940_Ariovistus/Project/test/test1/SConscript @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + Import('environment') env = Environment() diff --git a/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.cpp b/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.cpp index 2970549..a19fb34 100644 --- a/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.cpp +++ b/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.cpp @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "stuff.h" X::X() { diff --git a/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.h b/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.h index 863c330..6dc578d 100644 --- a/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.h +++ b/test/D/Issues/2940_Ariovistus/Project/test/test1/stuff.h @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + class X { public: diff --git a/test/D/Issues/2940_Ariovistus/Project/test/test1/test1.cpp b/test/D/Issues/2940_Ariovistus/Project/test/test1/test1.cpp index f4d7208..b995685 100644 --- a/test/D/Issues/2940_Ariovistus/Project/test/test1/test1.cpp +++ b/test/D/Issues/2940_Ariovistus/Project/test/test1/test1.cpp @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "stuff.h" int main() { diff --git a/test/D/Issues/2940_Ariovistus/Project/test/test1/test2.d b/test/D/Issues/2940_Ariovistus/Project/test/test1/test2.d index 4fbfa4d..07179c1 100644 --- a/test/D/Issues/2940_Ariovistus/Project/test/test1/test2.d +++ b/test/D/Issues/2940_Ariovistus/Project/test/test1/test2.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; struct X { diff --git a/test/D/Issues/2994/Project/SConstruct_template b/test/D/Issues/2994/Project/SConstruct_template index 555b1b0..3d1bbc6 100644 --- a/test/D/Issues/2994/Project/SConstruct_template +++ b/test/D/Issues/2994/Project/SConstruct_template @@ -1,5 +1,8 @@ -# -*- mode:python; coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +DefaultEnvironment(tools=[]) env=Environment({}) change = ARGUMENTS.get('change', 0) diff --git a/test/D/Issues/2994/Project/main.d b/test/D/Issues/2994/Project/main.d index f0aa23a..8bea7ff 100644 --- a/test/D/Issues/2994/Project/main.d +++ b/test/D/Issues/2994/Project/main.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + /* This program prints a hello world message to the console. */ diff --git a/test/D/MixedDAndC/Image/SConstruct b/test/D/MixedDAndC/Image/SConstruct index f24e2b3..d104e2f 100644 --- a/test/D/MixedDAndC/Image/SConstruct +++ b/test/D/MixedDAndC/Image/SConstruct @@ -1,9 +1,11 @@ -# -*- mode:python; coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation import os -environment = Environment( -) +DefaultEnvironment(tools=[]) +environment = Environment() # CFLAGS=['-m64'], # DLINKFLAGS=['-m64'], # DFLAGS=['-m64', '-O']) diff --git a/test/D/MixedDAndC/Image/cmod.c b/test/D/MixedDAndC/Image/cmod.c index 31be5e9..72ace7b 100644 --- a/test/D/MixedDAndC/Image/cmod.c +++ b/test/D/MixedDAndC/Image/cmod.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + int csqr(int arg) { return arg*arg; } diff --git a/test/D/MixedDAndC/Image/dmod.d b/test/D/MixedDAndC/Image/dmod.d index c609b9c..4ab1b39 100644 --- a/test/D/MixedDAndC/Image/dmod.d +++ b/test/D/MixedDAndC/Image/dmod.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + module dmod; import std.stdio; diff --git a/test/D/MixedDAndC/Image/proj.d b/test/D/MixedDAndC/Image/proj.d index 3e0bf95..2da7057 100644 --- a/test/D/MixedDAndC/Image/proj.d +++ b/test/D/MixedDAndC/Image/proj.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + import std.stdio; import dmod; diff --git a/test/D/SharedObjects/Image/SConstruct_template b/test/D/SharedObjects/Image/SConstruct_template index 7ae1c8d..f852c09 100644 --- a/test/D/SharedObjects/Image/SConstruct_template +++ b/test/D/SharedObjects/Image/SConstruct_template @@ -1,4 +1,6 @@ -# -*- mode:python; coding:utf-8; -*- +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation # The core difference between this test and the one of SharedObjectSuffixIssue # is that here we explicitly use the relevant D tool and things work. diff --git a/test/D/SharedObjects/Image/code.d b/test/D/SharedObjects/Image/code.d index 0d9d1d7..2073b31 100644 --- a/test/D/SharedObjects/Image/code.d +++ b/test/D/SharedObjects/Image/code.d @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + int returnTheAnswer() { return 42; } diff --git a/test/Decider/MD5-winonly-fixture/SConstruct b/test/Decider/MD5-winonly-fixture/SConstruct index 9775a43..9eb66a3 100644 --- a/test/Decider/MD5-winonly-fixture/SConstruct +++ b/test/Decider/MD5-winonly-fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) env=Environment() env.Decider('MD5-timestamp') diff --git a/test/Dir/DriveAbsPath/SConstruct b/test/Dir/DriveAbsPath/SConstruct index 5b63193..598723d 100644 --- a/test/Dir/DriveAbsPath/SConstruct +++ b/test/Dir/DriveAbsPath/SConstruct @@ -1,32 +1,42 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import SCons +DefaultEnvironment(tools=[]) env = Environment() drive = os.path.splitdrive(os.getcwd())[0] drive_dir = env.fs.Dir(drive) if not isinstance(drive_dir, SCons.Node.FS.RootDir): - raise Exception('env.fs.Dir("%s") returned a %s instead of a RootDir' % - (drive, type(drive_dir))) + raise Exception( + f'env.fs.Dir("{drive}") returned a {type(drive_dir)} instead of a RootDir' + ) drive_abspath1 = drive_dir._abspath drive_abspath2 = drive_dir.abspath if drive_abspath1 != drive_abspath2: - raise Exception('Calculated _abspath %s is not the same as abspath %s' % - (drive_abspath1, drive_abspath2)) + raise Exception( + f'Calculated _abspath {drive_abspath1} is not the same as abspath {drive_abspath2}' + ) elif not os.path.exists(drive_abspath1): - raise Exception('Calculated abspath %s does not exist' % drive_abspath1) + raise Exception(f'Calculated abspath {drive_abspath1} does not exist') elif drive.rstrip(os.path.sep) != drive_abspath1.rstrip(os.path.sep): - raise Exception('Real drive %s and calculated abspath %s are not the ' - 'same' % (drive, drive_abspath1)) + raise Exception( + f'Real drive {drive} and calculated abspath {drive_abspath1} are not the same' + ) drive_path1 = drive_dir._path drive_path2 = drive_dir.path if drive_path1 != drive_path2: - raise Exception('Calculated _path %s is not the same as path %s' % - (drive_path1, drive_path2)) + raise Exception( + f'Calculated _path {drive_path1} is not the same as path {drive_path2}' + ) elif not os.path.exists(drive_path1): - raise Exception('Calculated path %s does not exist' % drive_path1) + raise Exception(f'Calculated path {drive_path1} does not exist') elif drive.rstrip(os.path.sep) != drive_path1.rstrip(os.path.sep): - raise Exception('Real drive %s and calculated abspath %s are not the ' - 'same' % (drive, drive_abs)) + raise Exception( + f'Real drive {drive} and calculated abspath {drive_abs} are not the same' + ) diff --git a/test/Dir/PyPackageDir/image/SConstruct b/test/Dir/PyPackageDir/image/SConstruct index aceb245..d09b472 100644 --- a/test/Dir/PyPackageDir/image/SConstruct +++ b/test/Dir/PyPackageDir/image/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys, os oldsyspath = sys.path diff --git a/test/Docbook/basedir/htmlchunked/image/SConstruct b/test/Docbook/basedir/htmlchunked/image/SConstruct index 0066271..87a4658 100644 --- a/test/Docbook/basedir/htmlchunked/image/SConstruct +++ b/test/Docbook/basedir/htmlchunked/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtmlChunked('manual', xsl='html.xsl', base_dir='output/') diff --git a/test/Docbook/basedir/htmlchunked/image/SConstruct.cmd b/test/Docbook/basedir/htmlchunked/image/SConstruct.cmd index d981b28..40dc569 100644 --- a/test/Docbook/basedir/htmlchunked/image/SConstruct.cmd +++ b/test/Docbook/basedir/htmlchunked/image/SConstruct.cmd @@ -1,2 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) env.DocbookHtmlChunked('manual', xsl='html.xsl', base_dir='output/') diff --git a/test/Docbook/basedir/htmlhelp/image/SConstruct b/test/Docbook/basedir/htmlhelp/image/SConstruct index cb2893f..3ca5e8f 100644 --- a/test/Docbook/basedir/htmlhelp/image/SConstruct +++ b/test/Docbook/basedir/htmlhelp/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual', xsl='htmlhelp.xsl', base_dir='output/') diff --git a/test/Docbook/basedir/htmlhelp/image/SConstruct.cmd b/test/Docbook/basedir/htmlhelp/image/SConstruct.cmd index 8c7c9ca..f76e99b 100644 --- a/test/Docbook/basedir/htmlhelp/image/SConstruct.cmd +++ b/test/Docbook/basedir/htmlhelp/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) env.DocbookHtmlhelp('manual', xsl='htmlhelp.xsl', base_dir='output/') diff --git a/test/Docbook/basedir/slideshtml/image/SConstruct b/test/Docbook/basedir/slideshtml/image/SConstruct index 2bb86f0..f9b02dd 100644 --- a/test/Docbook/basedir/slideshtml/image/SConstruct +++ b/test/Docbook/basedir/slideshtml/image/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import xsltver v = xsltver.detectXsltVersion('/usr/share/xml/docbook/stylesheet/docbook-xsl') @@ -7,6 +11,7 @@ if v >= (1, 78, 0): # Use namespace-aware input file ns_ext = 'ns' +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookSlidesHtml('virt'+ns_ext, xsl='slides.xsl', base_dir='output/') diff --git a/test/Docbook/basedir/slideshtml/image/SConstruct.cmd b/test/Docbook/basedir/slideshtml/image/SConstruct.cmd index f82444d..151e603 100644 --- a/test/Docbook/basedir/slideshtml/image/SConstruct.cmd +++ b/test/Docbook/basedir/slideshtml/image/SConstruct.cmd @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import xsltver v = xsltver.detectXsltVersion('/usr/share/xml/docbook/stylesheet/docbook-xsl') @@ -7,6 +11,7 @@ if v >= (1, 78, 0): # Use namespace-aware input file ns_ext = 'ns' +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) env.Append(DOCBOOK_XSLTPROCFLAGS=['--novalid', '--nonet']) env.DocbookSlidesHtml('virt'+ns_ext, xsl='slides.xsl', base_dir='output/') diff --git a/test/Docbook/basedir/slideshtml/image/xsltver.py b/test/Docbook/basedir/slideshtml/image/xsltver.py index c845324..e1a7074 100644 --- a/test/Docbook/basedir/slideshtml/image/xsltver.py +++ b/test/Docbook/basedir/slideshtml/image/xsltver.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import re diff --git a/test/Docbook/basic/epub/image/SConstruct b/test/Docbook/basic/epub/image/SConstruct index 16a0699..3f4996d 100644 --- a/test/Docbook/basic/epub/image/SConstruct +++ b/test/Docbook/basic/epub/image/SConstruct @@ -1,2 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookEpub('manual') diff --git a/test/Docbook/basic/epub/image/SConstruct.cmd b/test/Docbook/basic/epub/image/SConstruct.cmd index 9b5e4cb..b86c78d 100644 --- a/test/Docbook/basic/epub/image/SConstruct.cmd +++ b/test/Docbook/basic/epub/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) DOCBOOK_XSLTPROC = ARGUMENTS.get('DOCBOOK_XSLTPROC', "") if DOCBOOK_XSLTPROC: diff --git a/test/Docbook/basic/html/image/SConstruct b/test/Docbook/basic/html/image/SConstruct index 954e639..4a9d074 100644 --- a/test/Docbook/basic/html/image/SConstruct +++ b/test/Docbook/basic/html/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtml('manual') diff --git a/test/Docbook/basic/html/image/SConstruct.cmd b/test/Docbook/basic/html/image/SConstruct.cmd index 3e58102..ef4eceb 100644 --- a/test/Docbook/basic/html/image/SConstruct.cmd +++ b/test/Docbook/basic/html/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) DOCBOOK_XSLTPROC = ARGUMENTS.get('DOCBOOK_XSLTPROC', "") if DOCBOOK_XSLTPROC: diff --git a/test/Docbook/basic/htmlchunked/image/SConstruct b/test/Docbook/basic/htmlchunked/image/SConstruct index 0004f8b..05a617f 100644 --- a/test/Docbook/basic/htmlchunked/image/SConstruct +++ b/test/Docbook/basic/htmlchunked/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtmlChunked('manual') diff --git a/test/Docbook/basic/htmlchunked/image/SConstruct.cmd b/test/Docbook/basic/htmlchunked/image/SConstruct.cmd index 8734147..765864a 100644 --- a/test/Docbook/basic/htmlchunked/image/SConstruct.cmd +++ b/test/Docbook/basic/htmlchunked/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) DOCBOOK_XSLTPROC = ARGUMENTS.get('DOCBOOK_XSLTPROC', "") if DOCBOOK_XSLTPROC: diff --git a/test/Docbook/basic/htmlhelp/image/SConstruct b/test/Docbook/basic/htmlhelp/image/SConstruct index 0c793d4..433a1c3 100644 --- a/test/Docbook/basic/htmlhelp/image/SConstruct +++ b/test/Docbook/basic/htmlhelp/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual') diff --git a/test/Docbook/basic/htmlhelp/image/SConstruct.cmd b/test/Docbook/basic/htmlhelp/image/SConstruct.cmd index e3e0193..854a266 100644 --- a/test/Docbook/basic/htmlhelp/image/SConstruct.cmd +++ b/test/Docbook/basic/htmlhelp/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) DOCBOOK_XSLTPROC = ARGUMENTS.get('DOCBOOK_XSLTPROC', "") if DOCBOOK_XSLTPROC: diff --git a/test/Docbook/basic/man/image/SConstruct b/test/Docbook/basic/man/image/SConstruct index ddfcfbc..2dcdb6e 100644 --- a/test/Docbook/basic/man/image/SConstruct +++ b/test/Docbook/basic/man/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookMan('refdb') diff --git a/test/Docbook/basic/man/image/SConstruct.cmd b/test/Docbook/basic/man/image/SConstruct.cmd index 122c0ce..6474f49 100644 --- a/test/Docbook/basic/man/image/SConstruct.cmd +++ b/test/Docbook/basic/man/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) DOCBOOK_XSLTPROC = ARGUMENTS.get('DOCBOOK_XSLTPROC', "") if DOCBOOK_XSLTPROC: diff --git a/test/Docbook/basic/pdf/image/SConstruct b/test/Docbook/basic/pdf/image/SConstruct index 01b2c7f..e863047 100644 --- a/test/Docbook/basic/pdf/image/SConstruct +++ b/test/Docbook/basic/pdf/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookPdf('manual') diff --git a/test/Docbook/basic/pdf/image/SConstruct.cmd b/test/Docbook/basic/pdf/image/SConstruct.cmd index db1ed18..5d70905 100644 --- a/test/Docbook/basic/pdf/image/SConstruct.cmd +++ b/test/Docbook/basic/pdf/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) DOCBOOK_XSLTPROC = ARGUMENTS.get('DOCBOOK_XSLTPROC', "") if DOCBOOK_XSLTPROC: diff --git a/test/Docbook/basic/slideshtml/image/SConstruct b/test/Docbook/basic/slideshtml/image/SConstruct index e1437da..a14f9ae 100644 --- a/test/Docbook/basic/slideshtml/image/SConstruct +++ b/test/Docbook/basic/slideshtml/image/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import xsltver v = xsltver.detectXsltVersion('/usr/share/xml/docbook/stylesheet/docbook-xsl') @@ -7,6 +11,9 @@ if v >= (1, 78, 0): # Use namespace-aware input file ns_ext = 'ns' +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) -env.DocbookSlidesHtml('virt'+ns_ext, xsl='/usr/share/xml/docbook/stylesheet/docbook-xsl/slides/xhtml/plain.xsl') - +env.DocbookSlidesHtml( + 'virt' + ns_ext, + xsl='/usr/share/xml/docbook/stylesheet/docbook-xsl/slides/xhtml/plain.xsl', +) diff --git a/test/Docbook/basic/slideshtml/image/SConstruct.cmd b/test/Docbook/basic/slideshtml/image/SConstruct.cmd index 08cbc31..2090bf0 100644 --- a/test/Docbook/basic/slideshtml/image/SConstruct.cmd +++ b/test/Docbook/basic/slideshtml/image/SConstruct.cmd @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import xsltver v = xsltver.detectXsltVersion('/usr/share/xml/docbook/stylesheet/docbook-xsl') @@ -7,7 +11,10 @@ if v >= (1, 78, 0): # Use namespace-aware input file ns_ext = 'ns' +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) env.Append(DOCBOOK_XSLTPROCFLAGS=['--novalid', '--nonet']) -env.DocbookSlidesHtml('virt'+ns_ext, xsl='/usr/share/xml/docbook/stylesheet/docbook-xsl/slides/xhtml/plain.xsl') - +env.DocbookSlidesHtml( + 'virt' + ns_ext, + xsl='/usr/share/xml/docbook/stylesheet/docbook-xsl/slides/xhtml/plain.xsl', +) diff --git a/test/Docbook/basic/slideshtml/image/xsltver.py b/test/Docbook/basic/slideshtml/image/xsltver.py index c845324..e1a7074 100644 --- a/test/Docbook/basic/slideshtml/image/xsltver.py +++ b/test/Docbook/basic/slideshtml/image/xsltver.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import re diff --git a/test/Docbook/basic/slidespdf/image/SConstruct b/test/Docbook/basic/slidespdf/image/SConstruct index e103f02..fbe359c 100644 --- a/test/Docbook/basic/slidespdf/image/SConstruct +++ b/test/Docbook/basic/slidespdf/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookSlidesPdf('virt') diff --git a/test/Docbook/basic/slidespdf/image/SConstruct.cmd b/test/Docbook/basic/slidespdf/image/SConstruct.cmd index 2000713..18ef25b 100644 --- a/test/Docbook/basic/slidespdf/image/SConstruct.cmd +++ b/test/Docbook/basic/slidespdf/image/SConstruct.cmd @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(DOCBOOK_PREFER_XSLTPROC=1, tools=['docbook']) env.Append(DOCBOOK_XSLTPROCFLAGS=['--novalid', '--nonet']) env.DocbookSlidesPdf('virt') diff --git a/test/Docbook/basic/xinclude/image/SConstruct b/test/Docbook/basic/xinclude/image/SConstruct index 91d92e6..a571345 100644 --- a/test/Docbook/basic/xinclude/image/SConstruct +++ b/test/Docbook/basic/xinclude/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookXInclude('manual_xi.xml','manual.xml') diff --git a/test/Docbook/basic/xslt/image/SConstruct b/test/Docbook/basic/xslt/image/SConstruct index 3e8ac4a..8ae620a 100644 --- a/test/Docbook/basic/xslt/image/SConstruct +++ b/test/Docbook/basic/xslt/image/SConstruct @@ -1,9 +1,13 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) # # Create document # -env.DocbookXslt('out.xml', 'in.xml', - xsl='./to_docbook.xslt') +env.DocbookXslt('out.xml', 'in.xml', xsl='./to_docbook.xslt') diff --git a/test/Docbook/basic/xsltsubdir/image/SConstruct b/test/Docbook/basic/xsltsubdir/image/SConstruct index 4fe062a..b01da8c 100644 --- a/test/Docbook/basic/xsltsubdir/image/SConstruct +++ b/test/Docbook/basic/xsltsubdir/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) SConscript('subdir/SConscript', 'env') diff --git a/test/Docbook/basic/xsltsubdir/image/subdir/SConscript b/test/Docbook/basic/xsltsubdir/image/subdir/SConscript index ea19df5..d88eaf5 100644 --- a/test/Docbook/basic/xsltsubdir/image/subdir/SConscript +++ b/test/Docbook/basic/xsltsubdir/image/subdir/SConscript @@ -1,7 +1,10 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + Import('env') # # Create document # -env.DocbookXslt('out.xml', 'in.xml', - xsl='to_docbook.xslt') +env.DocbookXslt('out.xml', 'in.xml', xsl='to_docbook.xslt') diff --git a/test/Docbook/dependencies/xinclude/image/SConstruct b/test/Docbook/dependencies/xinclude/image/SConstruct index 91d92e6..a571345 100644 --- a/test/Docbook/dependencies/xinclude/image/SConstruct +++ b/test/Docbook/dependencies/xinclude/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookXInclude('manual_xi.xml','manual.xml') diff --git a/test/Docbook/rootname/htmlchunked/image/SConstruct b/test/Docbook/rootname/htmlchunked/image/SConstruct index 905eec1..1187960 100644 --- a/test/Docbook/rootname/htmlchunked/image/SConstruct +++ b/test/Docbook/rootname/htmlchunked/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtmlChunked('manual.html','manual', xsl='html.xsl') diff --git a/test/Docbook/rootname/htmlhelp/image/SConstruct b/test/Docbook/rootname/htmlhelp/image/SConstruct index 913240b..93cd473 100644 --- a/test/Docbook/rootname/htmlhelp/image/SConstruct +++ b/test/Docbook/rootname/htmlhelp/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookHtmlhelp('manual.html', 'manual', xsl='htmlhelp.xsl') diff --git a/test/Docbook/rootname/slideshtml/image/SConstruct b/test/Docbook/rootname/slideshtml/image/SConstruct index 4f1079e..2181936 100644 --- a/test/Docbook/rootname/slideshtml/image/SConstruct +++ b/test/Docbook/rootname/slideshtml/image/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import xsltver v = xsltver.detectXsltVersion('/usr/share/xml/docbook/stylesheet/docbook-xsl') @@ -7,6 +11,7 @@ if v >= (1, 78, 0): # Use namespace-aware input file ns_ext = 'ns' +DefaultEnvironment(tools=[]) env = Environment(tools=['docbook']) env.DocbookSlidesHtml('manual.html', 'virt'+ns_ext, xsl='slides.xsl') diff --git a/test/Docbook/rootname/slideshtml/image/xsltver.py b/test/Docbook/rootname/slideshtml/image/xsltver.py index c845324..e1a7074 100644 --- a/test/Docbook/rootname/slideshtml/image/xsltver.py +++ b/test/Docbook/rootname/slideshtml/image/xsltver.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import re diff --git a/test/File/fixture/relpath/base/SConstruct b/test/File/fixture/relpath/base/SConstruct index 4bb5078..cb99226 100644 --- a/test/File/fixture/relpath/base/SConstruct +++ b/test/File/fixture/relpath/base/SConstruct @@ -1,22 +1,26 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +# # Testcase to check that .relpath works on SOURCES,TARGETS, and the singular SOURCE # This is the SConstruct for test/File/File-relpath.py -# + DefaultEnvironment(tools=[]) env = Environment(tools=[]) input_list = [ - "${TARGETS.relpath}", - "${TARGETS.abspath}", - "${SOURCES.relpath}", - "${SOURCES.abspath}", - "${SOURCE.relpath}", - "${SOURCE.abspath}", - ] + "${TARGETS.relpath}", + "${TARGETS.abspath}", + "${SOURCES.relpath}", + "${SOURCES.abspath}", + "${SOURCE.relpath}", + "${SOURCE.abspath}", +] outputs = env.subst( - input_list, + input_list, target=[File("../foo/dir"), File("build/file1")], source=[File("src/file")], ) -for i,s in zip(input_list,outputs): - print("%s=%s"%(i,s)) +for i, s in zip(input_list, outputs): + print("%s=%s" % (i, s)) diff --git a/test/Fortran/fixture/myfortran.py b/test/Fortran/fixture/myfortran.py index 6b4e5ef..2c5b580 100644 --- a/test/Fortran/fixture/myfortran.py +++ b/test/Fortran/fixture/myfortran.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import getopt import sys diff --git a/test/Fortran/fixture/myfortran_flags.py b/test/Fortran/fixture/myfortran_flags.py index 2b433ea..3ef841e 100644 --- a/test/Fortran/fixture/myfortran_flags.py +++ b/test/Fortran/fixture/myfortran_flags.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import getopt import sys diff --git a/test/Install/fixture/SConstruct-multi b/test/Install/fixture/SConstruct-multi index 94de1df..68736af 100644 --- a/test/Install/fixture/SConstruct-multi +++ b/test/Install/fixture/SConstruct-multi @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +# # first run creates a src file, makes it read-only, and installs. # second run updates src, Install should successfully replace # the previous install (read-only attr on Windows might fail it) diff --git a/test/Install/multi-dir/src/SConstruct b/test/Install/multi-dir/src/SConstruct index 44e3589..73683d3 100644 --- a/test/Install/multi-dir/src/SConstruct +++ b/test/Install/multi-dir/src/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +# # This tests for a bug where installing a sequence dirs and subdirs # outside the source tree can cause SCons to fail to create the dest # dir. diff --git a/test/Java/Java-fixture/myjar.py b/test/Java/Java-fixture/myjar.py index a47e3b0..3e17231 100644 --- a/test/Java/Java-fixture/myjar.py +++ b/test/Java/Java-fixture/myjar.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import fileinput import sys diff --git a/test/Java/Java-fixture/myjavac.py b/test/Java/Java-fixture/myjavac.py index 1c7fdea..c2a2602 100644 --- a/test/Java/Java-fixture/myjavac.py +++ b/test/Java/Java-fixture/myjavac.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys args = sys.argv[1:] diff --git a/test/Java/Java-fixture/myrmic.py b/test/Java/Java-fixture/myrmic.py index 877c1be..8934e7f 100644 --- a/test/Java/Java-fixture/myrmic.py +++ b/test/Java/Java-fixture/myrmic.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import sys diff --git a/test/Java/java_version_image/SConstruct b/test/Java/java_version_image/SConstruct index 945c864..37e49c2 100644 --- a/test/Java/java_version_image/SConstruct +++ b/test/Java/java_version_image/SConstruct @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation AddOption('--javac_path', dest='javac_path', @@ -11,25 +14,20 @@ AddOption('--java_version', default='1.6', type='string') -path=GetOption('javac_path') +path = GetOption('javac_path') if path[0] == "'": path = path[1:-1] version = GetOption('java_version') -env = Environment(tools = ['javac'], - JAVAVERSION = version, - ) - - -env.AppendENVPath('PATH',path) +DefaultEnvironment(tools=[]) +env = Environment(tools=['javac'], JAVAVERSION=version) +env.AppendENVPath('PATH', path) # print('PATH:%s'%env['ENV']['PATH']) - - -env.Java(target = 'class1', source = 'com/sub/foo') -env.Java(target = 'class2', source = 'com/sub/bar') -env.Java(target = 'class3', source = ['src1', 'src2']) -env.Java(target = 'class4', source = ['src4']) -env.Java(target = 'class5', source = ['src5']) -env.Java(target = 'class6', source = ['src6']) +env.Java(target='class1', source='com/sub/foo') +env.Java(target='class2', source='com/sub/bar') +env.Java(target='class3', source=['src1', 'src2']) +env.Java(target='class4', source=['src4']) +env.Java(target='class5', source=['src5']) +env.Java(target='class6', source=['src6']) diff --git a/test/Java/java_version_image/com/sub/bar/Example4.java b/test/Java/java_version_image/com/sub/bar/Example4.java index 0748d54..f27b16c 100644 --- a/test/Java/java_version_image/com/sub/bar/Example4.java +++ b/test/Java/java_version_image/com/sub/bar/Example4.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + package com.sub.bar; public class Example4 diff --git a/test/Java/java_version_image/com/sub/bar/Example5.java b/test/Java/java_version_image/com/sub/bar/Example5.java index 69d2937..de6d765 100644 --- a/test/Java/java_version_image/com/sub/bar/Example5.java +++ b/test/Java/java_version_image/com/sub/bar/Example5.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + package com.other; public class Example5 diff --git a/test/Java/java_version_image/com/sub/bar/Example6.java b/test/Java/java_version_image/com/sub/bar/Example6.java index 1811b80..85166d4 100644 --- a/test/Java/java_version_image/com/sub/bar/Example6.java +++ b/test/Java/java_version_image/com/sub/bar/Example6.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + package com.sub.bar; public class Example6 diff --git a/test/Java/java_version_image/com/sub/foo/Example1.java b/test/Java/java_version_image/com/sub/foo/Example1.java index 82aac2e..1ce4f84 100644 --- a/test/Java/java_version_image/com/sub/foo/Example1.java +++ b/test/Java/java_version_image/com/sub/foo/Example1.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + package com.sub.foo; public class Example1 diff --git a/test/Java/java_version_image/com/sub/foo/Example2.java b/test/Java/java_version_image/com/sub/foo/Example2.java index 6349ac9..9c9144d 100644 --- a/test/Java/java_version_image/com/sub/foo/Example2.java +++ b/test/Java/java_version_image/com/sub/foo/Example2.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + package com.other; public class Example2 diff --git a/test/Java/java_version_image/com/sub/foo/Example3.java b/test/Java/java_version_image/com/sub/foo/Example3.java index 092f0cd..962262a 100644 --- a/test/Java/java_version_image/com/sub/foo/Example3.java +++ b/test/Java/java_version_image/com/sub/foo/Example3.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + package com.sub.foo; public class Example3 diff --git a/test/Java/java_version_image/src1/Example7.java b/test/Java/java_version_image/src1/Example7.java index 80d94f2..b8304e8 100644 --- a/test/Java/java_version_image/src1/Example7.java +++ b/test/Java/java_version_image/src1/Example7.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + public class Example7 { diff --git a/test/Java/java_version_image/src2/Test.java b/test/Java/java_version_image/src2/Test.java index 6f224b0..c6606a2 100644 --- a/test/Java/java_version_image/src2/Test.java +++ b/test/Java/java_version_image/src2/Test.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + class Empty { } diff --git a/test/Java/java_version_image/src4/NestedExample.java b/test/Java/java_version_image/src4/NestedExample.java index 531f2e9..ac4edd5 100644 --- a/test/Java/java_version_image/src4/NestedExample.java +++ b/test/Java/java_version_image/src4/NestedExample.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + // import java.util.*; public class NestedExample diff --git a/test/Java/java_version_image/src5/TestSCons.java b/test/Java/java_version_image/src5/TestSCons.java index 46572c4..d169fd3 100644 --- a/test/Java/java_version_image/src5/TestSCons.java +++ b/test/Java/java_version_image/src5/TestSCons.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + class TestSCons { public static void main(String[] args) { Foo[] fooArray = new Foo[] { new Foo() }; diff --git a/test/Java/java_version_image/src6/TestSCons.java b/test/Java/java_version_image/src6/TestSCons.java index 1aeed2f..abf2077 100644 --- a/test/Java/java_version_image/src6/TestSCons.java +++ b/test/Java/java_version_image/src6/TestSCons.java @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + class test { test() diff --git a/test/LEX/lex_headerfile/spaced path/SConstruct b/test/LEX/lex_headerfile/spaced path/SConstruct index aa4aca0..2ec0ca8 100644 --- a/test/LEX/lex_headerfile/spaced path/SConstruct +++ b/test/LEX/lex_headerfile/spaced path/SConstruct @@ -1,2 +1,6 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) -SConscript("src/SConscript") \ No newline at end of file +SConscript("src/SConscript") diff --git a/test/LEX/lex_headerfile/spaced path/src/SConscript b/test/LEX/lex_headerfile/spaced path/src/SConscript index a3f4bfd..bbfc36e 100644 --- a/test/LEX/lex_headerfile/spaced path/src/SConscript +++ b/test/LEX/lex_headerfile/spaced path/src/SConscript @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + env = Environment(tools=['lex']) def make_header_path(env, target, source, for_signature): @@ -7,4 +11,4 @@ env.Replace(LEX_HEADER_FILE_GEN=make_header_path) env.Append(LEXFLAGS=['--header-file=$LEX_HEADER_FILE_GEN']) env.CFile(target=['#gen_src/lexer.c', '#gen_src/lexer.l.h'], source='lexer.l') -env.CFile(target=['#gen_src/lexer2.c', '#gen_src/lexer2.l.h'], source='lexer2.l') \ No newline at end of file +env.CFile(target=['#gen_src/lexer2.c', '#gen_src/lexer2.l.h'], source='lexer2.l') diff --git a/test/LINK/applelink_image/SConstruct_CurVers_CompatVers b/test/LINK/applelink_image/SConstruct_CurVers_CompatVers index 4a824d3..c92a979 100644 --- a/test/LINK/applelink_image/SConstruct_CurVers_CompatVers +++ b/test/LINK/applelink_image/SConstruct_CurVers_CompatVers @@ -1,13 +1,18 @@ - +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation vars = Variables(None, ARGUMENTS) vars.Add('SHLIBVERSION', 'Set the SHLIBVERSION', 0) vars.Add('APPLELINK_CURRENT_VERSION', 'Set APPLELINK_CURRENT_VERSION', 0) vars.Add('APPLELINK_COMPATIBILITY_VERSION', 'Set APPLELINK_COMPATIBILITY_VERSION', 0) vars.Add('APPLELINK_NO_CURRENT_VERSION', 'Set APPLELINK_NO_CURRENT_VERSION', 0) -vars.Add('APPLELINK_NO_COMPATIBILITY_VERSION', 'Set APPLELINK_NO_COMPATIBILITY_VERSION', 0) +vars.Add( + 'APPLELINK_NO_COMPATIBILITY_VERSION', 'Set APPLELINK_NO_COMPATIBILITY_VERSION', 0 +) -env = Environment(variables = vars, tools=['gcc', 'applelink']) +DefaultEnvironment(tools=[]) +env = Environment(variables=vars, tools=['gcc', 'applelink']) if env['APPLELINK_NO_CURRENT_VERSION'] == '0': env['APPLELINK_NO_CURRENT_VERSION'] = 0 @@ -15,21 +20,30 @@ if env['APPLELINK_NO_CURRENT_VERSION'] == '0': if env['APPLELINK_NO_COMPATIBILITY_VERSION'] == '0': env['APPLELINK_NO_COMPATIBILITY_VERSION'] = 0 - -print("SHLIBVERSION =[%s]"%env.get('SHLIBVERSION', False)) -print("APPLELINK_CURRENT_VERSION =[%s]"%env.get('APPLELINK_CURRENT_VERSION', False)) -print("APPLELINK_COMPATIBILITY_VERSION =[%s]"%env.get('APPLELINK_COMPATIBILITY_VERSION', False)) -print("APPLELINK_NO_CURRENT_VERSION =[%s]"%env.get('APPLELINK_NO_CURRENT_VERSION', False)) -print("APPLELINK_NO_COMPATIBILITY_VERSION=[%s]"%env.get('APPLELINK_NO_COMPATIBILITY_VERSION', False)) +print( + "SHLIBVERSION =[%s]" + % env.get('SHLIBVERSION', False) +) +print( + "APPLELINK_CURRENT_VERSION =[%s]" + % env.get('APPLELINK_CURRENT_VERSION', False) +) +print( + "APPLELINK_COMPATIBILITY_VERSION =[%s]" + % env.get('APPLELINK_COMPATIBILITY_VERSION', False) +) +print( + "APPLELINK_NO_CURRENT_VERSION =[%s]" + % env.get('APPLELINK_NO_CURRENT_VERSION', False) +) +print( + "APPLELINK_NO_COMPATIBILITY_VERSION=[%s]" + % env.get('APPLELINK_NO_COMPATIBILITY_VERSION', False) +) obj = env.SharedObject('foo.c') sl = env.SharedLibrary('foo', obj) sl2 = env.SharedLibrary('foo2', obj, SONAME='libfoo.4.dynlib') lm = env.LoadableModule('fool', obj) - -env.InstallVersionedLib(target='#/install', - source=sl) - -env.InstallVersionedLib(target='#/install', - source=lm) - +env.InstallVersionedLib(target='#/install', source=sl) +env.InstallVersionedLib(target='#/install', source=lm) diff --git a/test/LINK/applelink_image/SConstruct_gh2580 b/test/LINK/applelink_image/SConstruct_gh2580 index 79fd9d5..62255fa 100644 --- a/test/LINK/applelink_image/SConstruct_gh2580 +++ b/test/LINK/applelink_image/SConstruct_gh2580 @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) env = Environment(PLATFORM='darwin') env.Object( diff --git a/test/LINK/applelink_image/foo.c b/test/LINK/applelink_image/foo.c index a441953..5a53f5e 100644 --- a/test/LINK/applelink_image/foo.c +++ b/test/LINK/applelink_image/foo.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include int @@ -6,4 +10,4 @@ main(int argc, char *argv[]) argv[argc++] = "--"; printf("foo.c\n"); exit (0); -} \ No newline at end of file +} diff --git a/test/Libs/bug2903/SConstruct b/test/Libs/bug2903/SConstruct index 12919ce..4f701a4 100644 --- a/test/Libs/bug2903/SConstruct +++ b/test/Libs/bug2903/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +# # SConstruct for testing but #2903. # The test changes the lib name to make sure it rebuilds # when the name changes, even if the content of the lib is the same. @@ -5,9 +9,15 @@ # when other linker options change, and not when they don't. # (This doesn't specifically test LIBPATH, but there's a test for # that already.) -env=Environment() -libname=ARGUMENTS.get('libname', 'foo') +DefaultEnvironment(tools=[]) +env = Environment() +libname = ARGUMENTS.get('libname', 'foo') env.Append(SHLINKFLAGS=' $EXTRA_SHLINKFLAGS') -shlinkflags=ARGUMENTS.get('shlinkflags', '') -env.SharedLibrary('myshared', ['main.c'], - LIBS=[libname], LIBPATH='.', EXTRA_SHLINKFLAGS=shlinkflags) +shlinkflags = ARGUMENTS.get('shlinkflags', '') +env.SharedLibrary( + 'myshared', + ['main.c'], + LIBS=[libname], + LIBPATH='.', + EXTRA_SHLINKFLAGS=shlinkflags, +) diff --git a/test/Libs/bug2903/SConstruct-libs b/test/Libs/bug2903/SConstruct-libs index 1590062..6f57e13 100644 --- a/test/Libs/bug2903/SConstruct-libs +++ b/test/Libs/bug2903/SConstruct-libs @@ -1,5 +1,11 @@ -env=Environment() +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) +env = Environment() libfoo = env.SharedLibrary('foo', 'lib.c') env.InstallAs('${SHLIBPREFIX}bar${SHLIBSUFFIX}', libfoo[0]) -if len(libfoo) > 1: # on Windows, there's an import lib (also a .exp, but we don't want that) - env.InstallAs('${LIBPREFIX}bar${LIBSUFFIX}', libfoo[1]) +if len(libfoo) > 1: + # on Windows, there's an import lib (also a .exp, but we don't want that) + env.InstallAs('${LIBPREFIX}bar${LIBSUFFIX}', libfoo[1]) diff --git a/test/Libs/bug2903/lib.c b/test/Libs/bug2903/lib.c index 65f4cd2..2425c46 100644 --- a/test/Libs/bug2903/lib.c +++ b/test/Libs/bug2903/lib.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #ifdef _WIN32 __declspec(dllexport) #endif diff --git a/test/Libs/bug2903/main.c b/test/Libs/bug2903/main.c index a4b1ecc..e44ebd5 100644 --- a/test/Libs/bug2903/main.c +++ b/test/Libs/bug2903/main.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #ifdef _WIN32 __declspec(dllexport) #endif diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir.py b/test/MSVC/MSVC_BATCH-spaces-targetdir.py index 298e10e..9b11872 100644 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir.py +++ b/test/MSVC/MSVC_BATCH-spaces-targetdir.py @@ -1,11 +1,11 @@ -import TestSCons - +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +import TestSCons test = TestSCons.TestSCons() test.skip_if_not_msvc() - - test.dir_fixture('MSVC_BATCH-spaces-targetdir') -test.run() \ No newline at end of file +test.run() diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct b/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct index da8002b..025f9ee 100644 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct +++ b/test/MSVC/MSVC_BATCH-spaces-targetdir/SConstruct @@ -1,8 +1,15 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os.path -env=Environment(MSVC_BATCH=True) +DefaultEnvironment(tools=[]) +env = Environment(MSVC_BATCH=True) -td='tar ge tdir' -VariantDir(td,'src') -env.Program(os.path.join(td,'test_program'), - [os.path.join(td,a) for a in ['a.c','b.c','c.c']]) +td = 'tar ge tdir' +VariantDir(td, 'src') +env.Program( + os.path.join(td, 'test_program'), + [os.path.join(td, a) for a in ['a.c', 'b.c', 'c.c']], +) diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c index 1741de8..9164729 100644 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c +++ b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/a.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include extern void myfuncb(); @@ -12,4 +16,4 @@ int main(int argc, char *argv[]) { myfunca(); myfuncb(); myfuncc(); -} \ No newline at end of file +} diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c index e03c5d0..51e92dd 100644 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c +++ b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/b.c @@ -1,5 +1,9 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include void myfuncb() { printf("myfuncb\n"); -} \ No newline at end of file +} diff --git a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c index 1c262d3..fe9f203 100644 --- a/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c +++ b/test/MSVC/MSVC_BATCH-spaces-targetdir/src/c.c @@ -1,5 +1,9 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include void myfuncc() { printf("myfuncc\n"); -} \ No newline at end of file +} diff --git a/test/MSVC/MSVC_USE_SCRIPT_ARGS-fixture/SConstruct b/test/MSVC/MSVC_USE_SCRIPT_ARGS-fixture/SConstruct index 54d140e..cbdd8aa 100644 --- a/test/MSVC/MSVC_USE_SCRIPT_ARGS-fixture/SConstruct +++ b/test/MSVC/MSVC_USE_SCRIPT_ARGS-fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os if 'SCONS_CACHE_MSVC_CONFIG' in os.environ: diff --git a/test/MSVC/VSWHERE-fixture/SConstruct b/test/MSVC/VSWHERE-fixture/SConstruct index 38dfb0b..c80693e 100644 --- a/test/MSVC/VSWHERE-fixture/SConstruct +++ b/test/MSVC/VSWHERE-fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import os.path @@ -9,6 +13,7 @@ for vw_path in VSWHERE_PATHS: # Allow normal detection logic to find vswhere.exe +DefaultEnvironment(tools=[]) env1=Environment() print("VSWHERE-detect=%s" % env1['VSWHERE']) diff --git a/test/MSVC/msvc_fixture/SConstruct b/test/MSVC/msvc_fixture/SConstruct index af916dc..dd499ae 100644 --- a/test/MSVC/msvc_fixture/SConstruct +++ b/test/MSVC/msvc_fixture/SConstruct @@ -1,4 +1,8 @@ -# msvc_fixture's SConstruct +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +"""msvc_fixture's SConstruct""" DefaultEnvironment(tools=[]) # TODO: this is order-dependent (putting 'mssdk' second or third breaks), diff --git a/test/MSVC/msvc_fixture/StdAfx.cpp b/test/MSVC/msvc_fixture/StdAfx.cpp index a6a290b..caba43c 100644 --- a/test/MSVC/msvc_fixture/StdAfx.cpp +++ b/test/MSVC/msvc_fixture/StdAfx.cpp @@ -1,4 +1,8 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "StdAfx.h" #ifndef PCHDEF this line generates an error if PCHDEF is not defined! -#endif \ No newline at end of file +#endif diff --git a/test/MSVC/msvc_fixture/StdAfx.h b/test/MSVC/msvc_fixture/StdAfx.h index a92d7df..9e0a9a1 100644 --- a/test/MSVC/msvc_fixture/StdAfx.h +++ b/test/MSVC/msvc_fixture/StdAfx.h @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include -#include "resource.h" \ No newline at end of file +#include "resource.h" diff --git a/test/MSVC/msvc_fixture/foo.cpp b/test/MSVC/msvc_fixture/foo.cpp index 09f15b6..6b92848 100644 --- a/test/MSVC/msvc_fixture/foo.cpp +++ b/test/MSVC/msvc_fixture/foo.cpp @@ -1 +1,5 @@ -#include "StdAfx.h" \ No newline at end of file +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + +#include "StdAfx.h" diff --git a/test/MSVC/msvc_fixture/resource.h b/test/MSVC/msvc_fixture/resource.h index 089e932..fef9b5b 100644 --- a/test/MSVC/msvc_fixture/resource.h +++ b/test/MSVC/msvc_fixture/resource.h @@ -1 +1,5 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #define IDS_TEST 2001 diff --git a/test/MSVC/msvc_fixture/test.cpp b/test/MSVC/msvc_fixture/test.cpp index 354b5f1..edb2ef5 100644 --- a/test/MSVC/msvc_fixture/test.cpp +++ b/test/MSVC/msvc_fixture/test.cpp @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "StdAfx.h" #include "resource.h" @@ -7,4 +11,4 @@ int main(void) LoadString(GetModuleHandle(NULL), IDS_TEST, test, sizeof(test)); printf("%d %s\n", IDS_TEST, test); return 0; -} \ No newline at end of file +} diff --git a/test/MSVC/pch_gen/fixture/SConstruct b/test/MSVC/pch_gen/fixture/SConstruct index ab63cd6..2d91925 100644 --- a/test/MSVC/pch_gen/fixture/SConstruct +++ b/test/MSVC/pch_gen/fixture/SConstruct @@ -1,43 +1,45 @@ -# pch_gen fixture's SConstruct +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +"""pch_gen fixture's SConstruct""" DefaultEnvironment(tools=[]) # TODO: this is order-dependent (putting 'mssdk' second or third breaks), # and ideally we shouldn't need to specify the tools= list anyway. - -VariantDir('output1','src') -VariantDir('output2','src') - +VariantDir('output1', 'src') +VariantDir('output2', 'src') # Add flag to cause pch_gen to return empty string # This will enable testing that PCH if subst'd yields empty string will stop # PCH from being enabled. vars = Variables(None, ARGUMENTS) -vars.AddVariables(BoolVariable("DISABLE_PCH", help="Disable PCH functionality", default=False)) - +vars.AddVariables( + BoolVariable("DISABLE_PCH", help="Disable PCH functionality", default=False) +) env = Environment(variables=vars, tools=["mssdk", "msvc", "mslink"]) env.Append(CCFLAGS="/DPCHDEF") env["PDB"] = File("output1/test.pdb") env["PCHSTOP"] = "StdAfx.h" - def pch_gen(env, target, source, for_signature): if env['DISABLE_PCH']: return "" else: return "StdAfx-1.pch" - env["PCH"] = pch_gen env.PCH("output1/StdAfx-1.pch", "output1/StdAfx.cpp") -env.Program("output1/test", ["output1/test.cpp", env.RES("output1/test.rc")], LIBS=["user32"]) +env.Program( + "output1/test", + ["output1/test.cpp", env.RES("output1/test.rc")], + LIBS=["user32"], +) env.Object("output1/fast", "output1/foo.cpp") env.Object("output1/slow", "output1/foo.cpp", PCH=0) - - - env2 = env.Clone() def pch_gen2(env, target, source, for_signature): @@ -45,9 +47,13 @@ def pch_gen2(env, target, source, for_signature): return "" else: return env.get('PCH_NODE') + env2["PDB"] = File("output2/test.pdb") env2["PCHSTOP"] = "StdAfx.h" env2["PCH"] = pch_gen2 env2['PCH_NODE'] = env2.PCH("output2/StdAfx-1.pch", "output2/StdAfx.cpp")[0] -env2.Program("output2/test", ["output2/test.cpp", env.RES("output2/test.rc")], LIBS=["user32"]) - +env2.Program( + "output2/test", + ["output2/test.cpp", env.RES("output2/test.rc")], + LIBS=["user32"], +) diff --git a/test/MinGW/bug_2799/SConstruct b/test/MinGW/bug_2799/SConstruct index f22cacc..00606ee 100644 --- a/test/MinGW/bug_2799/SConstruct +++ b/test/MinGW/bug_2799/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment( tools=['mingw'], SHCCCOMSTR='SHCC $TARGET', @@ -8,7 +13,5 @@ env = Environment( SHLIBPREFIX='lib', LDMODULESUFFIX='.so', ) - env.SharedLibrary('testlib', 'shlib.c') - env.LoadableModule('testmodule', 'module.c') diff --git a/test/MinGW/bug_2799/module.c b/test/MinGW/bug_2799/module.c index 3cf5ace..31703f0 100644 --- a/test/MinGW/bug_2799/module.c +++ b/test/MinGW/bug_2799/module.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + extern void bar(void) { } diff --git a/test/MinGW/bug_2799/shlib.c b/test/MinGW/bug_2799/shlib.c index efe6b3f..f942e9f 100644 --- a/test/MinGW/bug_2799/shlib.c +++ b/test/MinGW/bug_2799/shlib.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + extern int foo(void) { return 0; diff --git a/test/Parallel/failed-build/fixture/SConstruct b/test/Parallel/failed-build/fixture/SConstruct index 21109fe..6236aa6 100644 --- a/test/Parallel/failed-build/fixture/SConstruct +++ b/test/Parallel/failed-build/fixture/SConstruct @@ -1,12 +1,19 @@ -import sys +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os +import random +import sys import threading -import random +from teststate import server_thread + PORT = random.randint(10000, 60000) sys.path.append(os.getcwd()) -from teststate import server_thread + +DefaultEnvironment(tools=[]) # this thread will setup a sever for the different tasks to talk to # and act as a manager of IPC and the different tasks progressing @@ -21,4 +28,4 @@ env = Environment(BUILDERS={'MyCopy' : MyCopy, 'Fail' : Fail}) env.Fail(target='f3', source='f3.in') env.MyCopy(target='f4', source='f4.in') env.MyCopy(target='f5', source='f5.in') -env.MyCopy(target='f6', source='f6.in') \ No newline at end of file +env.MyCopy(target='f6', source='f6.in') diff --git a/test/Parallel/failed-build/fixture/mycopy.py b/test/Parallel/failed-build/fixture/mycopy.py index 97c8e88..3826d87 100644 --- a/test/Parallel/failed-build/fixture/mycopy.py +++ b/test/Parallel/failed-build/fixture/mycopy.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import sys import time @@ -32,4 +36,4 @@ if count >= WAIT: sys.exit(99) conn.close() -sys.exit(0) \ No newline at end of file +sys.exit(0) diff --git a/test/Parallel/failed-build/fixture/myfail.py b/test/Parallel/failed-build/fixture/myfail.py index bd54d44..4c6a8ab 100644 --- a/test/Parallel/failed-build/fixture/myfail.py +++ b/test/Parallel/failed-build/fixture/myfail.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import sys import time @@ -28,4 +32,4 @@ if count >= WAIT: conn.request("GET", "/?set_myfail_done=1&pid=" + str(os.getpid())) conn.close() -sys.exit(1) \ No newline at end of file +sys.exit(1) diff --git a/test/Parallel/failed-build/fixture/teststate.py b/test/Parallel/failed-build/fixture/teststate.py index d02957e..8499720 100644 --- a/test/Parallel/failed-build/fixture/teststate.py +++ b/test/Parallel/failed-build/fixture/teststate.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import http.server import socketserver import time @@ -87,4 +91,4 @@ def server_thread(PORT): return httpd = socketserver.TCPServer(("127.0.0.1", PORT), S) - httpd.serve_forever() \ No newline at end of file + httpd.serve_forever() diff --git a/test/Progress/multi_target_fixture/SConstruct b/test/Progress/multi_target_fixture/SConstruct index 5a16f05..9a5ed11 100644 --- a/test/Progress/multi_target_fixture/SConstruct +++ b/test/Progress/multi_target_fixture/SConstruct @@ -1,15 +1,20 @@ -import SCons +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +import SCons class ProgressTest: - def __call__(self, node): if node.get_state() == SCons.Node.executing: print(node) - +DefaultEnvironment(tools=[]) env = Environment(tools=[]) -env.Command(target=['out1.txt', 'out2.txt'], source=['in.txt'], action=Action( - 'echo $SOURCE > ${TARGETS[0]};echo $SOURCE > ${TARGETS[1]}', None)) +env.Command( + target=['out1.txt', 'out2.txt'], + source=['in.txt'], + action=Action('echo $SOURCE > ${TARGETS[0]};echo $SOURCE > ${TARGETS[1]}', None), +) Progress(ProgressTest()) diff --git a/test/SConscript/fixture/SConstruct b/test/SConscript/fixture/SConstruct index a955efc..aec868e 100644 --- a/test/SConscript/fixture/SConstruct +++ b/test/SConscript/fixture/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons from SCons.Warnings import _warningOut import sys diff --git a/test/SConscript/must_exist_deprecation.py b/test/SConscript/must_exist_deprecation.py index eaa0c42..4c1db12 100644 --- a/test/SConscript/must_exist_deprecation.py +++ b/test/SConscript/must_exist_deprecation.py @@ -44,7 +44,7 @@ warnmsg = """ scons: warning: Calling missing SConscript without error is deprecated. Transition by adding must_exist=False to SConscript calls. Missing SConscript '{}' -""".format(missing) + test.python_file_line(SConstruct_path, 14) +""".format(missing) + test.python_file_line(SConstruct_path, 18) expect_stderr = warnmsg test.run(arguments=".", stderr=expect_stderr) diff --git a/test/Scanner/Python/SConstruct b/test/Scanner/Python/SConstruct index 988cf60..6a3fd05 100644 --- a/test/Scanner/Python/SConstruct +++ b/test/Scanner/Python/SConstruct @@ -1,5 +1,10 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys +DefaultEnvironment(tools=[]) env = Environment(tools=['python']) # Copy each file individually instead of copying the dir. This has the benefit @@ -13,4 +18,4 @@ for srcNode in srcDir.glob('*'): # Don't set a dependency on the copy actions on purpose. Scanner should find # the dependencies automatically. -env.Command('a.out', 'script.py', '$PYTHON $SOURCE $TARGET', PYTHON=sys.executable) \ No newline at end of file +env.Command('a.out', 'script.py', '$PYTHON $SOURCE $TARGET', PYTHON=sys.executable) diff --git a/test/Scanner/Python/script.py b/test/Scanner/Python/script.py index 105a575..e51ec41 100644 --- a/test/Scanner/Python/script.py +++ b/test/Scanner/Python/script.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import package1 # noqa: F401 import package2 # noqa: F401 import sys diff --git a/test/Scanner/Python/to_be_copied/__init__.py b/test/Scanner/Python/to_be_copied/__init__.py index 3c1c05b..bd9464c 100644 --- a/test/Scanner/Python/to_be_copied/__init__.py +++ b/test/Scanner/Python/to_be_copied/__init__.py @@ -1 +1,5 @@ -from . import helper # noqa: F401 \ No newline at end of file +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +from . import helper # noqa: F401 diff --git a/test/SideEffect/Issues/3013/files/SConscript b/test/SideEffect/Issues/3013/files/SConscript index 27da7bb..53cfcdc 100644 --- a/test/SideEffect/Issues/3013/files/SConscript +++ b/test/SideEffect/Issues/3013/files/SConscript @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + Import('env') primary = env.make_file('output', 'test.cpp') diff --git a/test/SideEffect/Issues/3013/files/SConstruct b/test/SideEffect/Issues/3013/files/SConstruct index d01a4b7..9294cb0 100644 --- a/test/SideEffect/Issues/3013/files/SConstruct +++ b/test/SideEffect/Issues/3013/files/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment() def make_file(target, source, env): diff --git a/test/SideEffect/Issues/3013/files/test.cpp b/test/SideEffect/Issues/3013/files/test.cpp index 27424b0..94e2cad 100644 --- a/test/SideEffect/Issues/3013/files/test.cpp +++ b/test/SideEffect/Issues/3013/files/test.cpp @@ -1,2 +1,6 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + void some_function() {} diff --git a/test/Subst/fixture/SConstruct.callable_exception b/test/Subst/fixture/SConstruct.callable_exception index 3f1b337..1c1b952 100644 --- a/test/Subst/fixture/SConstruct.callable_exception +++ b/test/Subst/fixture/SConstruct.callable_exception @@ -1,11 +1,17 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + class TestCallable(object): def __init__(self, thing, makePathsRelative = True, debug = False): pass + def __call__(self, target, source, env, for_signature): raise TypeError("User callable exception") +DefaultEnvironment(tools=[]) env = Environment() env["TESTCLASS"] = TestCallable env["CCCOM"] = "$CC $_CCCOMCOM $CCFLAGS -o ${TESTCLASS('$TARGET')} -c ${TESTCLASS('$SOURCES')}" -env.Program(target='test_main', source='test_main.c') \ No newline at end of file +env.Program(target='test_main', source='test_main.c') diff --git a/test/TEMPFILE/fixture/SConstruct-tempfile-actionlist b/test/TEMPFILE/fixture/SConstruct-tempfile-actionlist index 07b6345..8d2069b 100644 --- a/test/TEMPFILE/fixture/SConstruct-tempfile-actionlist +++ b/test/TEMPFILE/fixture/SConstruct-tempfile-actionlist @@ -1,6 +1,14 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) -env = Environment(tools=[], - BUILDCOM=['${TEMPFILE("xxx.py -otempfile $SOURCE")}', - '${TEMPFILE("yyy.py -o$TARGET tempfile")}'], - MAXLINELENGTH=1) +env = Environment( + tools=[], + BUILDCOM=[ + '${TEMPFILE("xxx.py -otempfile $SOURCE")}', + '${TEMPFILE("yyy.py -o$TARGET tempfile")}', + ], + MAXLINELENGTH=1, +) env.Command('file.output', 'file.input', '$BUILDCOM') diff --git a/test/TEMPFILE/fixture/SConstruct.tempfiledir b/test/TEMPFILE/fixture/SConstruct.tempfiledir index ea26c27..0e45b7f 100644 --- a/test/TEMPFILE/fixture/SConstruct.tempfiledir +++ b/test/TEMPFILE/fixture/SConstruct.tempfiledir @@ -1,7 +1,12 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os my_temp_dir = os.path.join(os.getcwd(), 'my_temp_files') +DefaultEnvironment(tools=[]) env = Environment( BUILDCOM='${TEMPFILE("xxx.py $TARGET $SOURCES")}', MAXLINELENGTH=16, diff --git a/test/TaskMaster/bug_2811/fixture_dir/SConstruct b/test/TaskMaster/bug_2811/fixture_dir/SConstruct index d453368..1f8c364 100644 --- a/test/TaskMaster/bug_2811/fixture_dir/SConstruct +++ b/test/TaskMaster/bug_2811/fixture_dir/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ This issue requires the following. 1. Generated source file which outputs 2 (or more) files @@ -29,17 +33,12 @@ def _dwo_emitter(target, source, env): return (targets, source) build_string = '$MYCOPY $SOURCE $TARGET' - - bld = Builder(action=build_string) +DefaultEnvironment(tools=[]) env = Environment(BUILDERS={'Foo': bld}, MYCOPY="%s mycopy.py"%sys.executable) - env['SHCCCOM'] = '$MYCOPY $SOURCE $TARGET && $MYCOPY $SOURCE ${TARGETS[1]}' - env['SHCCCOMSTR'] = env['SHCCCOM'] - - suffixes = ['.c'] for object_builder in SCons.Tool.createObjBuilders(env): @@ -63,4 +62,4 @@ env.Foo('b','b.in') # seems like processing is always alphabetical.. -# code: language=python insertSpaces=4 tabSize=4 \ No newline at end of file +# code: language=python insertSpaces=4 tabSize=4 diff --git a/test/TaskMaster/bug_2811/fixture_dir/mycopy.py b/test/TaskMaster/bug_2811/fixture_dir/mycopy.py index c1a57f5..3e4f7c0 100644 --- a/test/TaskMaster/bug_2811/fixture_dir/mycopy.py +++ b/test/TaskMaster/bug_2811/fixture_dir/mycopy.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys import shutil diff --git a/test/YACC/YACC-fixture/SConstruct_YACC_before b/test/YACC/YACC-fixture/SConstruct_YACC_before index 94f7adf..78ca5db 100644 --- a/test/YACC/YACC-fixture/SConstruct_YACC_before +++ b/test/YACC/YACC-fixture/SConstruct_YACC_before @@ -1,4 +1,9 @@ -env=Environment(tools=[]) -env2=env.Clone(YACC="SOMETHING_DUMB") +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) +env = Environment(tools=[]) +env2 = env.Clone(YACC="SOMETHING_DUMB") env2.Tool('yacc') env2.CFile('aaa.y') diff --git a/test/YACC/YACC-fixture/myyacc.py b/test/YACC/YACC-fixture/myyacc.py index 77f80ea..5027122 100644 --- a/test/YACC/YACC-fixture/myyacc.py +++ b/test/YACC/YACC-fixture/myyacc.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import getopt import sys diff --git a/test/YACC/YACCFLAGS-fixture/myyacc.py b/test/YACC/YACCFLAGS-fixture/myyacc.py index 3bc1375..6558f07 100644 --- a/test/YACC/YACCFLAGS-fixture/myyacc.py +++ b/test/YACC/YACCFLAGS-fixture/myyacc.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import getopt import sys from pathlib import Path diff --git a/test/fixture/SConstruct-check-valid-options b/test/fixture/SConstruct-check-valid-options index 53bdf89..9e7c990 100644 --- a/test/fixture/SConstruct-check-valid-options +++ b/test/fixture/SConstruct-check-valid-options @@ -5,6 +5,8 @@ import sys from SCons.Script.SConsOptions import SConsOptionParser, SConsBadOptionError +DefaultEnvironment(tools=[]) + AddOption( '--testing', help='Test arg', diff --git a/test/fixture/SConstruct_test_main.py b/test/fixture/SConstruct_test_main.py index 8d2d2b0..aa4284d 100644 --- a/test/fixture/SConstruct_test_main.py +++ b/test/fixture/SConstruct_test_main.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) env = Environment() env.Program('main.exe', ['main.c']) diff --git a/test/fixture/echo.py b/test/fixture/echo.py index a13f2ca..3f685c2 100755 --- a/test/fixture/echo.py +++ b/test/fixture/echo.py @@ -1,2 +1,6 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys print(sys.argv) diff --git a/test/fixture/mycompile.py b/test/fixture/mycompile.py index 15a1c6f..d858f6a 100644 --- a/test/fixture/mycompile.py +++ b/test/fixture/mycompile.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Phony compiler for testing SCons. diff --git a/test/fixture/mygcc.py b/test/fixture/mygcc.py index 91ca386..146e596 100644 --- a/test/fixture/mygcc.py +++ b/test/fixture/mygcc.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Phony compiler for testing SCons. diff --git a/test/fixture/mylex.py b/test/fixture/mylex.py index b5e94b1..9c9417e 100644 --- a/test/fixture/mylex.py +++ b/test/fixture/mylex.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Phony lex for testing SCons. diff --git a/test/fixture/mylink.py b/test/fixture/mylink.py index f462655..abe22ae 100644 --- a/test/fixture/mylink.py +++ b/test/fixture/mylink.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Phony linker for testing SCons. diff --git a/test/fixture/myrewrite.py b/test/fixture/myrewrite.py index eb83cac..f331558 100644 --- a/test/fixture/myrewrite.py +++ b/test/fixture/myrewrite.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + r""" Phony tool to modify a file in place for testing SCons. diff --git a/test/fixture/no_msvc/no_msvcs_sconstruct.py b/test/fixture/no_msvc/no_msvcs_sconstruct.py index 18366d8..1aed9ec 100644 --- a/test/fixture/no_msvc/no_msvcs_sconstruct.py +++ b/test/fixture/no_msvc/no_msvcs_sconstruct.py @@ -1,15 +1,21 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) + def DummyVsWhere(msvc_version, env): # not testing versions with vswhere, so return none return None for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] SCons.Tool.MSCommon.vc.find_vc_pdir_vswhere = DummyVsWhere - env = SCons.Environment.Environment() - -print('MSVC_VERSION='+str(env.get('MSVC_VERSION'))) \ No newline at end of file +print('MSVC_VERSION=' + str(env.get('MSVC_VERSION'))) diff --git a/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_query_toolset_version.py b/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_query_toolset_version.py index 8e3c65f..fc5558b 100644 --- a/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_query_toolset_version.py +++ b/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_query_toolset_version.py @@ -1,15 +1,21 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) + def DummyVsWhere(msvc_version, env): # not testing versions with vswhere, so return none return None for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] SCons.Tool.MSCommon.vc.find_vc_pdir_vswhere = DummyVsWhere - msvc_version, msvc_toolset_version = SCons.Tool.MSCommon.msvc_query_version_toolset() - -print('msvc_version={}, msvc_toolset_version={}'.format(repr(msvc_version), repr(msvc_toolset_version))) \ No newline at end of file +print(f'msvc_version={msvc_version!r}, msvc_toolset_version={msvc_toolset_version!r}') diff --git a/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_sdk_versions.py b/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_sdk_versions.py index 7953ce6..6e7562d 100644 --- a/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_sdk_versions.py +++ b/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_sdk_versions.py @@ -1,15 +1,21 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) + def DummyVsWhere(msvc_version, env): # not testing versions with vswhere, so return none return None for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] SCons.Tool.MSCommon.vc.find_vc_pdir_vswhere = DummyVsWhere - sdk_version_list = SCons.Tool.MSCommon.msvc_sdk_versions() - -print('sdk_version_list='+repr(sdk_version_list)) +print('sdk_version_list=' + repr(sdk_version_list)) diff --git a/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_toolset_versions.py b/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_toolset_versions.py index fd209fd..c2208cd 100644 --- a/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_toolset_versions.py +++ b/test/fixture/no_msvc/no_msvcs_sconstruct_msvc_toolset_versions.py @@ -1,15 +1,21 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) + def DummyVsWhere(msvc_version, env): # not testing versions with vswhere, so return none return None for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] SCons.Tool.MSCommon.vc.find_vc_pdir_vswhere = DummyVsWhere - toolset_version_list = SCons.Tool.MSCommon.msvc_toolset_versions() - -print('toolset_version_list='+repr(toolset_version_list)) +print('toolset_version_list=' + repr(toolset_version_list)) diff --git a/test/fixture/no_msvc/no_msvcs_sconstruct_tools.py b/test/fixture/no_msvc/no_msvcs_sconstruct_tools.py index 9aa924b..2f2f07a 100644 --- a/test/fixture/no_msvc/no_msvcs_sconstruct_tools.py +++ b/test/fixture/no_msvc/no_msvcs_sconstruct_tools.py @@ -1,14 +1,21 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) + def DummyVsWhere(msvc_version, env): # not testing versions with vswhere, so return none return None for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] SCons.Tool.MSCommon.vc.find_vc_pdir_vswhere = DummyVsWhere - env = SCons.Environment.Environment(tools=['myignoredefaultmsvctool']) diff --git a/test/fixture/no_msvc/no_msvcs_sconstruct_version.py b/test/fixture/no_msvc/no_msvcs_sconstruct_version.py index b586d6c..bd81688 100644 --- a/test/fixture/no_msvc/no_msvcs_sconstruct_version.py +++ b/test/fixture/no_msvc/no_msvcs_sconstruct_version.py @@ -1,19 +1,21 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) def DummyVsWhere(msvc_version, env): # not testing versions with vswhere, so return none return None - for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] SCons.Tool.MSCommon.vc.find_vc_pdir_vswhere = DummyVsWhere - SCons.Tool.MSCommon.msvc_set_notfound_policy('error') - env = SCons.Environment.Environment(MSVC_VERSION='14.3') - - diff --git a/test/fixture/no_msvc/no_regs_sconstruct.py b/test/fixture/no_msvc/no_regs_sconstruct.py index 3eeca94..9dcc7a8 100644 --- a/test/fixture/no_msvc/no_regs_sconstruct.py +++ b/test/fixture/no_msvc/no_regs_sconstruct.py @@ -1,7 +1,15 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons import SCons.Tool.MSCommon +DefaultEnvironment(tools=[]) + for key in SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR: - SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key]=[(SCons.Util.HKEY_LOCAL_MACHINE, r'')] + SCons.Tool.MSCommon.vc._VCVER_TO_PRODUCT_DIR[key] = [ + (SCons.Util.HKEY_LOCAL_MACHINE, r'') + ] -env = SCons.Environment.Environment() \ No newline at end of file +env = SCons.Environment.Environment() diff --git a/test/fixture/python_scanner/curdir_reference/script.py b/test/fixture/python_scanner/curdir_reference/script.py index d533863..280e41a 100644 --- a/test/fixture/python_scanner/curdir_reference/script.py +++ b/test/fixture/python_scanner/curdir_reference/script.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from . import helper diff --git a/test/fixture/python_scanner/from_import_simple_package_module1.py b/test/fixture/python_scanner/from_import_simple_package_module1.py index dcc86de..ab03709 100644 --- a/test/fixture/python_scanner/from_import_simple_package_module1.py +++ b/test/fixture/python_scanner/from_import_simple_package_module1.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from simple_package import module1 diff --git a/test/fixture/python_scanner/from_import_simple_package_module1_as.py b/test/fixture/python_scanner/from_import_simple_package_module1_as.py index 51061c6..ee97737 100644 --- a/test/fixture/python_scanner/from_import_simple_package_module1_as.py +++ b/test/fixture/python_scanner/from_import_simple_package_module1_as.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from simple_package import module1 as m1 diff --git a/test/fixture/python_scanner/from_import_simple_package_module1_func.py b/test/fixture/python_scanner/from_import_simple_package_module1_func.py index e9877fb..5ee6920 100644 --- a/test/fixture/python_scanner/from_import_simple_package_module1_func.py +++ b/test/fixture/python_scanner/from_import_simple_package_module1_func.py @@ -1 +1,5 @@ -from simple_package.module1 import somefunc # noqa: F401 \ No newline at end of file +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +from simple_package.module1 import somefunc # noqa: F401 diff --git a/test/fixture/python_scanner/from_import_simple_package_modules_no_space.py b/test/fixture/python_scanner/from_import_simple_package_modules_no_space.py index 17b82f8..5560dc8 100644 --- a/test/fixture/python_scanner/from_import_simple_package_modules_no_space.py +++ b/test/fixture/python_scanner/from_import_simple_package_modules_no_space.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from simple_package import module1,module2 diff --git a/test/fixture/python_scanner/from_import_simple_package_modules_with_space.py b/test/fixture/python_scanner/from_import_simple_package_modules_with_space.py index 169e6f7..7c13d22 100644 --- a/test/fixture/python_scanner/from_import_simple_package_modules_with_space.py +++ b/test/fixture/python_scanner/from_import_simple_package_modules_with_space.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from simple_package import module1, module2 diff --git a/test/fixture/python_scanner/from_nested1_import_multiple.py b/test/fixture/python_scanner/from_nested1_import_multiple.py index 2cdd47f..0a75bd8 100644 --- a/test/fixture/python_scanner/from_nested1_import_multiple.py +++ b/test/fixture/python_scanner/from_nested1_import_multiple.py @@ -1 +1,5 @@ -from nested1 import module, nested2 # noqa: F401 \ No newline at end of file +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +from nested1 import module, nested2 # noqa: F401 diff --git a/test/fixture/python_scanner/import_simple_package_module1.py b/test/fixture/python_scanner/import_simple_package_module1.py index bd85010..1bd2fca 100644 --- a/test/fixture/python_scanner/import_simple_package_module1.py +++ b/test/fixture/python_scanner/import_simple_package_module1.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import simple_package.module1 diff --git a/test/fixture/python_scanner/import_simple_package_module1_as.py b/test/fixture/python_scanner/import_simple_package_module1_as.py index a706672..25da8a9 100644 --- a/test/fixture/python_scanner/import_simple_package_module1_as.py +++ b/test/fixture/python_scanner/import_simple_package_module1_as.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import simple_package.module1 as m1 diff --git a/test/fixture/python_scanner/imports_nested3.py b/test/fixture/python_scanner/imports_nested3.py index c2929d0..4929cbd 100644 --- a/test/fixture/python_scanner/imports_nested3.py +++ b/test/fixture/python_scanner/imports_nested3.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import nested1.nested2.nested3 diff --git a/test/fixture/python_scanner/imports_simple_package.py b/test/fixture/python_scanner/imports_simple_package.py index d974128..059dd6e 100644 --- a/test/fixture/python_scanner/imports_simple_package.py +++ b/test/fixture/python_scanner/imports_simple_package.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import simple_package diff --git a/test/fixture/python_scanner/imports_unknown_files.py b/test/fixture/python_scanner/imports_unknown_files.py index 5582e7b..0bfc401 100644 --- a/test/fixture/python_scanner/imports_unknown_files.py +++ b/test/fixture/python_scanner/imports_unknown_files.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import doesntexist # noqa: F401 import notthere.something # noqa: F401 -from notthere import a, few, things # noqa: F401 \ No newline at end of file +from notthere import a, few, things # noqa: F401 diff --git a/test/fixture/python_scanner/nested1/nested2/nested3/imports_grandparent_module.py b/test/fixture/python_scanner/nested1/nested2/nested3/imports_grandparent_module.py index 06bb7f5..e952aef 100644 --- a/test/fixture/python_scanner/nested1/nested2/nested3/imports_grandparent_module.py +++ b/test/fixture/python_scanner/nested1/nested2/nested3/imports_grandparent_module.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from ... import module diff --git a/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_module.py b/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_module.py index be10279..9701e4d 100644 --- a/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_module.py +++ b/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_module.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from .. import module diff --git a/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_then_submodule.py b/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_then_submodule.py index 39f1a1a..cc629c0 100644 --- a/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_then_submodule.py +++ b/test/fixture/python_scanner/nested1/nested2/nested3/imports_parent_then_submodule.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from ...nested2a import module diff --git a/test/fixture/python_scanner/simple_package/module1.py b/test/fixture/python_scanner/simple_package/module1.py index 6880c47..1991088 100644 --- a/test/fixture/python_scanner/simple_package/module1.py +++ b/test/fixture/python_scanner/simple_package/module1.py @@ -1,2 +1,6 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def somefunc(): - return \ No newline at end of file + return diff --git a/test/fixture/test_main.c b/test/fixture/test_main.c index adbe919..e81a58b 100644 --- a/test/fixture/test_main.c +++ b/test/fixture/test_main.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + int main( int argc, char* argv[] ) { return 0; diff --git a/test/fixture/wrapper.py b/test/fixture/wrapper.py index c266cfa..05cea02 100644 --- a/test/fixture/wrapper.py +++ b/test/fixture/wrapper.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Command wrapper, for testing SCons. diff --git a/test/fixture/wrapper_with_args.py b/test/fixture/wrapper_with_args.py index 769aea4..6621077 100644 --- a/test/fixture/wrapper_with_args.py +++ b/test/fixture/wrapper_with_args.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Command wrapper taking arguments, for testing SCons. diff --git a/test/ninja/ninja-fixture/bar.c b/test/ninja/ninja-fixture/bar.c index 15b2ecc..cc7b901 100644 --- a/test/ninja/ninja-fixture/bar.c +++ b/test/ninja/ninja-fixture/bar.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/ninja/ninja-fixture/foo.c b/test/ninja/ninja-fixture/foo.c index ba35c68..8389085 100644 --- a/test/ninja/ninja-fixture/foo.c +++ b/test/ninja/ninja-fixture/foo.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/ninja/ninja-fixture/gen_source.c b/test/ninja/ninja-fixture/gen_source.c index 38ac3fe..dffaecc 100644 --- a/test/ninja/ninja-fixture/gen_source.c +++ b/test/ninja/ninja-fixture/gen_source.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/ninja/ninja-fixture/test1.c b/test/ninja/ninja-fixture/test1.c index 678461f..f2c28f7 100644 --- a/test/ninja/ninja-fixture/test1.c +++ b/test/ninja/ninja-fixture/test1.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/ninja/ninja-fixture/test2.cpp b/test/ninja/ninja-fixture/test2.cpp index 69b54c9..504956e 100644 --- a/test/ninja/ninja-fixture/test2.cpp +++ b/test/ninja/ninja-fixture/test2.cpp @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include "test2.hpp" int @@ -13,4 +17,4 @@ int Foo::print_function() { std::cout << "print_function"; return 0; -} \ No newline at end of file +} diff --git a/test/ninja/ninja-fixture/test_impl.c b/test/ninja/ninja-fixture/test_impl.c index ac3fd88..5f12306 100644 --- a/test/ninja/ninja-fixture/test_impl.c +++ b/test/ninja/ninja-fixture/test_impl.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + #include #include diff --git a/test/ninja/ninja_test_sconscripts/ninja_conftest b/test/ninja/ninja_test_sconscripts/ninja_conftest index 993972a..7549880 100644 --- a/test/ninja/ninja_test_sconscripts/ninja_conftest +++ b/test/ninja/ninja_test_sconscripts/ninja_conftest @@ -1,10 +1,13 @@ -SetOption('experimental','ninja') -DefaultEnvironment(tools=[]) +# MIT License +# +# Copyright The SCons Foundation import sys -env = Environment() +SetOption('experimental','ninja') +DefaultEnvironment(tools=[]) +env = Environment() conf = Configure(env) env.Tool('ninja') diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_control_c_ninja b/test/ninja/ninja_test_sconscripts/sconstruct_control_c_ninja index 34d7872..7fdcf29 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_control_c_ninja +++ b/test/ninja/ninja_test_sconscripts/sconstruct_control_c_ninja @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import os import signal diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_default_targets b/test/ninja/ninja_test_sconscripts/sconstruct_default_targets index 8963270..1a92be3 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_default_targets +++ b/test/ninja/ninja_test_sconscripts/sconstruct_default_targets @@ -1,12 +1,14 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons SetOption('experimental','ninja') DefaultEnvironment(tools=[]) env = Environment(tools=[]) - env.Tool('ninja') - env.Command('out1.txt', 'foo.c', 'echo test > $TARGET' ) out2_node = env.Command('out2.txt', 'foo.c', 'echo test > $TARGET', NINJA_FORCE_SCONS_BUILD=True) alias = env.Alias('def', out2_node) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_force_scons_callback b/test/ninja/ninja_test_sconscripts/sconstruct_force_scons_callback index ef3562b..75a6dae 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_force_scons_callback +++ b/test/ninja/ninja_test_sconscripts/sconstruct_force_scons_callback @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption("experimental", "ninja") DefaultEnvironment(tools=[]) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build b/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build index 81a4366..9769e15 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build +++ b/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption('experimental','ninja') DefaultEnvironment(tools=[]) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build_cxx b/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build_cxx index f7137df..c306b21 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build_cxx +++ b/test/ninja/ninja_test_sconscripts/sconstruct_generate_and_build_cxx @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption('experimental','ninja') DefaultEnvironment(tools=[]) env = Environment() diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_generated_sources_alias b/test/ninja/ninja_test_sconscripts/sconstruct_generated_sources_alias index 3661bcc..d8fcf09 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_generated_sources_alias +++ b/test/ninja/ninja_test_sconscripts/sconstruct_generated_sources_alias @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons SetOption('experimental','ninja') @@ -38,4 +42,4 @@ my_gen_alias, env.Textfile('generated_header2.c', [ 'int func2(){return func1();}' ]) -env.Program(target='gen_source', source=['gen_source.c', 'generated_header2.c']) \ No newline at end of file +env.Program(target='gen_source', source=['gen_source.c', 'generated_header2.c']) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_mingw_command_generator_action b/test/ninja/ninja_test_sconscripts/sconstruct_mingw_command_generator_action index e3fcfe2..475fca7 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_mingw_command_generator_action +++ b/test/ninja/ninja_test_sconscripts/sconstruct_mingw_command_generator_action @@ -1,7 +1,11 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption('experimental','ninja') DefaultEnvironment(tools=[]) env = Environment(tools=['mingw']) env.Tool('ninja') dll = env.SharedLibrary(target='test_impl', source='test_impl.c') -env.Program(target='test', source='test1.c', LIBS=[dll]) \ No newline at end of file +env.Program(target='test', source='test1.c', LIBS=[dll]) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_mingw_depfile_format b/test/ninja/ninja_test_sconscripts/sconstruct_mingw_depfile_format index b765db5..4a48ca6 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_mingw_depfile_format +++ b/test/ninja/ninja_test_sconscripts/sconstruct_mingw_depfile_format @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption('experimental','ninja') DefaultEnvironment(tools=[]) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line index 4967912..ffd0d03 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line +++ b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption('experimental','ninja') DefaultEnvironment(tools=[]) diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism index 3d3eecb..a7982d4 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism +++ b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_determinism @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import random SetOption('experimental', 'ninja') diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_no_for_sig_subst b/test/ninja/ninja_test_sconscripts/sconstruct_no_for_sig_subst index 69f72b6..dda8d0d 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_no_for_sig_subst +++ b/test/ninja/ninja_test_sconscripts/sconstruct_no_for_sig_subst @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import SCons SetOption('experimental','ninja') diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_response_file b/test/ninja/ninja_test_sconscripts/sconstruct_response_file index 6b7eb5d..c384054 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_response_file +++ b/test/ninja/ninja_test_sconscripts/sconstruct_response_file @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + SetOption('experimental','ninja') DefaultEnvironment(tools=[]) @@ -12,4 +16,4 @@ env.Program(target='foo', source='foo.c', OBJSUFFIX=env['OBJSUFFIX'] + "1") env2 = env.Clone() env2.Append(CPPPATH='very/long/and/very/fake/path/for/testing') -env2.Program(target='foo2', source='foo.c', OBJSUFFIX=env['OBJSUFFIX'] + "2") \ No newline at end of file +env2.Program(target='foo2', source='foo.c', OBJSUFFIX=env['OBJSUFFIX'] + "2") diff --git a/test/option/fixture/SConstruct__experimental b/test/option/fixture/SConstruct__experimental index 2348b9a..d1e8fc7 100644 --- a/test/option/fixture/SConstruct__experimental +++ b/test/option/fixture/SConstruct__experimental @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from SCons.Script.SConsOptions import experimental_features print("All Features=%s" % ','.join(sorted(experimental_features))) diff --git a/test/option/fixture/SConstruct__taskmastertrace b/test/option/fixture/SConstruct__taskmastertrace index 91e8c91..eedd6fb 100644 --- a/test/option/fixture/SConstruct__taskmastertrace +++ b/test/option/fixture/SConstruct__taskmastertrace @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +# DefaultEnvironment(tools=[]) env = Environment(tools=[]) diff --git a/test/option/hash-format/SConstruct b/test/option/hash-format/SConstruct index de76e1b..44cab5a 100644 --- a/test/option/hash-format/SConstruct +++ b/test/option/hash-format/SConstruct @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import atexit import sys diff --git a/test/option/hash-format/build.py b/test/option/hash-format/build.py index 6b6baad..1d14042 100644 --- a/test/option/hash-format/build.py +++ b/test/option/hash-format/build.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys with open(sys.argv[1], 'wb') as f, open(sys.argv[2], 'rb') as infp: - f.write(infp.read()) \ No newline at end of file + f.write(infp.read()) diff --git a/test/packaging/convenience-functions/image/SConstruct b/test/packaging/convenience-functions/image/SConstruct index a424fd9..e11bff5 100644 --- a/test/packaging/convenience-functions/image/SConstruct +++ b/test/packaging/convenience-functions/image/SConstruct @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['default', 'packaging']) prog = env.Install( 'bin/', ["f1", "f2"] ) env.File( "f3" ) diff --git a/test/packaging/rpm/src/main.c b/test/packaging/rpm/src/main.c index 49e8969..cff3239 100644 --- a/test/packaging/rpm/src/main.c +++ b/test/packaging/rpm/src/main.c @@ -1,3 +1,7 @@ +// SPDX-License-Identifier: MIT +// +// Copyright The SCons Foundation + int main( int argc, char* argv[] ) { diff --git a/test/packaging/sandbox-test/SConstruct b/test/packaging/sandbox-test/SConstruct index f44a471..c286d80 100644 --- a/test/packaging/sandbox-test/SConstruct +++ b/test/packaging/sandbox-test/SConstruct @@ -1,19 +1,27 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation from glob import glob -src_files = glob( 'src/*.c' ) -include_files = glob( 'src/*.h' ) +src_files = glob('src/*.c') +include_files = glob('src/*.h') -SharedLibrary( 'foobar', src_files ) +SharedLibrary('foobar', src_files) +DefaultEnvironment(tools=[]) env = Environment(tools=['default', 'packaging']) -env.Package( NAME = 'libfoobar', - VERSION = '1.2.3', - PACKAGETYPE = 'targz', - source = src_files + include_files ) +env.Package( + NAME='libfoobar', + VERSION='1.2.3', + PACKAGETYPE='targz', + source=src_files + include_files, +) -env.Package( NAME = 'libfoobar', - VERSION = '1.2.3', - PACKAGETYPE = 'zip', - source = src_files + include_files ) +env.Package( + NAME='libfoobar', + VERSION='1.2.3', + PACKAGETYPE='zip', + source=src_files + include_files, +) diff --git a/test/textfile/fixture/SConstruct b/test/textfile/fixture/SConstruct index b246687..8c3dc3b 100644 --- a/test/textfile/fixture/SConstruct +++ b/test/textfile/fixture/SConstruct @@ -1,5 +1,8 @@ -DefaultEnvironment(tools=[]) +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation +DefaultEnvironment(tools=[]) env = Environment(tools=['textfile']) data0 = ['Goethe', 'Schiller'] data = ['lalala', 42, data0, 'tanteratei', @@ -11,9 +14,11 @@ env.Textfile('foo1a.txt', data + ['']) env.Textfile('foo2a.txt', data + [''], LINESEPARATOR='|*') issue_4021_textfile = r'..\..\..\@HINT_PATH@\Datalogics.PDFL.dll' -env.Textfile('issue-4021.txt', issue_4021_textfile, - SUBST_DICT={'@HINT_PATH@': r'NETCore\bin\$$(Platform)\$$(Configuration)'}) - +env.Textfile( + 'issue-4021.txt', + issue_4021_textfile, + SUBST_DICT={'@HINT_PATH@': r'NETCore\bin\$$(Platform)\$$(Configuration)'}, +) # recreate the list with the data wrapped in Value() data0 = list(map(Value, data0)) data = list(map(Value, data)) diff --git a/test/textfile/fixture/SConstruct.2 b/test/textfile/fixture/SConstruct.2 index b7e63a1..6b5f02e 100644 --- a/test/textfile/fixture/SConstruct.2 +++ b/test/textfile/fixture/SConstruct.2 @@ -1,9 +1,14 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) -textlist = ['This line has no substitutions', - 'This line has @subst@ substitutions', - 'This line has %subst% substitutions', - ] +textlist = [ + 'This line has no substitutions', + 'This line has @subst@ substitutions', + 'This line has %subst% substitutions', +] sub1 = {'@subst@': 'most'} sub2 = {'%subst%': 'many'} diff --git a/test/textfile/fixture/SConstruct.issue-3540 b/test/textfile/fixture/SConstruct.issue-3540 index 021689a..04cccca 100644 --- a/test/textfile/fixture/SConstruct.issue-3540 +++ b/test/textfile/fixture/SConstruct.issue-3540 @@ -1,17 +1,16 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + """ Test for GH Issue 3540 textfile()'s action is not sensitive to changes in TEXTFILESUFFIX (rather was sensitive to SUBSTFILESUFFIX) - """ -DefaultEnvironment(tools=[]) - text_file_suffix = ARGUMENTS.get('text_file_suffix', 'DEFAULTSUFFIX') - -env = Environment(tools=['textfile'], - TEXTFILESUFFIX=text_file_suffix) - +DefaultEnvironment(tools=[]) +env = Environment(tools=['textfile'], TEXTFILESUFFIX=text_file_suffix) env['FOO_PATH'] = "test-value-1" foo = env.Substfile( @@ -19,5 +18,5 @@ foo = env.Substfile( source="substfile.in", SUBST_DICT={ "@foo_path@": "$FOO_PATH", - } + }, ) diff --git a/test/textfile/fixture/SConstruct.issue-3550 b/test/textfile/fixture/SConstruct.issue-3550 index 0239ade..b2708d4 100644 --- a/test/textfile/fixture/SConstruct.issue-3550 +++ b/test/textfile/fixture/SConstruct.issue-3550 @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + DefaultEnvironment(tools=[]) env = Environment(tools=['textfile']) diff --git a/test/textfile/fixture/SConstruct.issue-4037 b/test/textfile/fixture/SConstruct.issue-4037 index d5c8f96..44cc3ff 100644 --- a/test/textfile/fixture/SConstruct.issue-4037 +++ b/test/textfile/fixture/SConstruct.issue-4037 @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment() def generator(source, target, env, for_signature): @@ -9,10 +14,6 @@ env['GENERATOR'] = generator env.Textfile( target="target", - source=[ - "@generated@", - ], - SUBST_DICT={ - '@generated@' : '$GENERATOR', - }, + source=["@generated@"], + SUBST_DICT={'@generated@' : '$GENERATOR'}, ) diff --git a/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py index 1c024e1..670c942 100644 --- a/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py +++ b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py index 225b9aa..1a8d052 100644 --- a/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py +++ b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py index c266f89..96e681b 100644 --- a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool1_1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py index f203260..e34618d 100644 --- a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool1_2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py index b1b47a2..047ae78 100644 --- a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool2_1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py index 407df86..d99e6c5 100644 --- a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool2_2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/SConstruct b/test/toolpath/nested/image/SConstruct index 7fac870..89f1041 100644 --- a/test/toolpath/nested/image/SConstruct +++ b/test/toolpath/nested/image/SConstruct @@ -1,39 +1,47 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + import sys, os -toollist = ['Toolpath_TestTool1', - 'Toolpath_TestTool2', - 'subdir1.Toolpath_TestTool1_1', - 'subdir1.Toolpath_TestTool1_2', - 'subdir1.subdir2.Toolpath_TestTool2_1', - 'subdir1.subdir2.Toolpath_TestTool2_2', - ] +DefaultEnvironment(tools=[]) + +toollist = [ + 'Toolpath_TestTool1', + 'Toolpath_TestTool2', + 'subdir1.Toolpath_TestTool1_1', + 'subdir1.Toolpath_TestTool1_2', + 'subdir1.subdir2.Toolpath_TestTool2_1', + 'subdir1.subdir2.Toolpath_TestTool2_2', +] print('Test where tools are located under site_scons/site_tools') env1 = Environment(tools=toollist) -print("env1['Toolpath_TestTool1'] = %s"%env1.get('Toolpath_TestTool1')) -print("env1['Toolpath_TestTool2'] = %s"%env1.get('Toolpath_TestTool2')) -print("env1['Toolpath_TestTool1_1'] = %s"%env1.get('Toolpath_TestTool1_1')) -print("env1['Toolpath_TestTool1_2'] = %s"%env1.get('Toolpath_TestTool1_2')) -print("env1['Toolpath_TestTool2_1'] = %s"%env1.get('Toolpath_TestTool2_1')) -print("env1['Toolpath_TestTool2_2'] = %s"%env1.get('Toolpath_TestTool2_2')) +print("env1['Toolpath_TestTool1'] = %s" % env1.get('Toolpath_TestTool1')) +print("env1['Toolpath_TestTool2'] = %s" % env1.get('Toolpath_TestTool2')) +print("env1['Toolpath_TestTool1_1'] = %s" % env1.get('Toolpath_TestTool1_1')) +print("env1['Toolpath_TestTool1_2'] = %s" % env1.get('Toolpath_TestTool1_2')) +print("env1['Toolpath_TestTool2_1'] = %s" % env1.get('Toolpath_TestTool2_1')) +print("env1['Toolpath_TestTool2_2'] = %s" % env1.get('Toolpath_TestTool2_2')) print('Test where toolpath is set in the env constructor') env2 = Environment(tools=toollist, toolpath=['Libs/tools_example']) -print("env2['Toolpath_TestTool1'] = %s"%env2.get('Toolpath_TestTool1')) -print("env2['Toolpath_TestTool2'] = %s"%env2.get('Toolpath_TestTool2')) -print("env2['Toolpath_TestTool1_1'] = %s"%env2.get('Toolpath_TestTool1_1')) -print("env2['Toolpath_TestTool1_2'] = %s"%env2.get('Toolpath_TestTool1_2')) -print("env2['Toolpath_TestTool2_1'] = %s"%env2.get('Toolpath_TestTool2_1')) -print("env2['Toolpath_TestTool2_2'] = %s"%env2.get('Toolpath_TestTool2_2')) +print("env2['Toolpath_TestTool1'] = %s" % env2.get('Toolpath_TestTool1')) +print("env2['Toolpath_TestTool2'] = %s" % env2.get('Toolpath_TestTool2')) +print("env2['Toolpath_TestTool1_1'] = %s" % env2.get('Toolpath_TestTool1_1')) +print("env2['Toolpath_TestTool1_2'] = %s" % env2.get('Toolpath_TestTool1_2')) +print("env2['Toolpath_TestTool2_1'] = %s" % env2.get('Toolpath_TestTool2_1')) +print("env2['Toolpath_TestTool2_2'] = %s" % env2.get('Toolpath_TestTool2_2')) print('Test a Clone') base = Environment(tools=[], toolpath=['Libs/tools_example']) derived = base.Clone(tools=['subdir1.Toolpath_TestTool1_1']) -print("derived['Toolpath_TestTool1_1'] = %s"%derived.get('Toolpath_TestTool1_1')) - - +print("derived['Toolpath_TestTool1_1'] = %s" % derived.get('Toolpath_TestTool1_1')) print('Test using syspath as the toolpath') -print('Lets pretend that tools_example within Libs is actually a module installed via pip') +print( + 'Lets pretend that tools_example within Libs ' + 'is actually a module installed via pip' +) oldsyspath = sys.path dir_path = Dir('.').srcnode().abspath dir_path = os.path.join(dir_path, 'Libs') @@ -43,27 +51,29 @@ searchpaths = [] for item in sys.path: if os.path.isdir(item): searchpaths.append(item) -toollist = ['tools_example.Toolpath_TestTool1', - 'tools_example.Toolpath_TestTool2', - 'tools_example.subdir1.Toolpath_TestTool1_1', - 'tools_example.subdir1.Toolpath_TestTool1_2', - 'tools_example.subdir1.subdir2.Toolpath_TestTool2_1', - 'tools_example.subdir1.subdir2.Toolpath_TestTool2_2', - ] +toollist = [ + 'tools_example.Toolpath_TestTool1', + 'tools_example.Toolpath_TestTool2', + 'tools_example.subdir1.Toolpath_TestTool1_1', + 'tools_example.subdir1.Toolpath_TestTool1_2', + 'tools_example.subdir1.subdir2.Toolpath_TestTool2_1', + 'tools_example.subdir1.subdir2.Toolpath_TestTool2_2', +] env3 = Environment(tools=toollist, toolpath=searchpaths) -print("env3['Toolpath_TestTool1'] = %s"%env3.get('Toolpath_TestTool1')) -print("env3['Toolpath_TestTool2'] = %s"%env3.get('Toolpath_TestTool2')) -print("env3['Toolpath_TestTool1_1'] = %s"%env3.get('Toolpath_TestTool1_1')) -print("env3['Toolpath_TestTool1_2'] = %s"%env3.get('Toolpath_TestTool1_2')) -print("env3['Toolpath_TestTool2_1'] = %s"%env3.get('Toolpath_TestTool2_1')) -print("env3['Toolpath_TestTool2_2'] = %s"%env3.get('Toolpath_TestTool2_2')) - +print("env3['Toolpath_TestTool1'] = %s" % env3.get('Toolpath_TestTool1')) +print("env3['Toolpath_TestTool2'] = %s" % env3.get('Toolpath_TestTool2')) +print("env3['Toolpath_TestTool1_1'] = %s" % env3.get('Toolpath_TestTool1_1')) +print("env3['Toolpath_TestTool1_2'] = %s" % env3.get('Toolpath_TestTool1_2')) +print("env3['Toolpath_TestTool2_1'] = %s" % env3.get('Toolpath_TestTool2_1')) +print("env3['Toolpath_TestTool2_2'] = %s" % env3.get('Toolpath_TestTool2_2')) print('Test using PyPackageDir') toollist = ['Toolpath_TestTool2_1', 'Toolpath_TestTool2_2'] -env4 = Environment(tools = toollist, toolpath = [PyPackageDir('tools_example.subdir1.subdir2')]) -print("env4['Toolpath_TestTool2_1'] = %s"%env4.get('Toolpath_TestTool2_1')) -print("env4['Toolpath_TestTool2_2'] = %s"%env4.get('Toolpath_TestTool2_2')) +env4 = Environment( + tools=toollist, toolpath=[PyPackageDir('tools_example.subdir1.subdir2')] +) +print("env4['Toolpath_TestTool2_1'] = %s" % env4.get('Toolpath_TestTool2_1')) +print("env4['Toolpath_TestTool2_2'] = %s" % env4.get('Toolpath_TestTool2_2')) sys.path = oldsyspath diff --git a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py index 1c024e1..670c942 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py +++ b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py index 225b9aa..1a8d052 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py +++ b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py index c266f89..96e681b 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool1_1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py index f203260..e34618d 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool1_2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py index b1b47a2..047ae78 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool2_1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py index 407df86..d99e6c5 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['Toolpath_TestTool2_2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/relative_import/image/SConstruct b/test/toolpath/relative_import/image/SConstruct index cf607d1..0f720e8 100644 --- a/test/toolpath/relative_import/image/SConstruct +++ b/test/toolpath/relative_import/image/SConstruct @@ -1,10 +1,15 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + +DefaultEnvironment(tools=[]) env = Environment(tools=['TestTool1', 'TestTool1.TestTool1_2'], toolpath=['tools']) # Test a relative import within the root of the tools directory -print("env['TestTool1'] = %s"%env.get('TestTool1')) -print("env['TestTool1_1'] = %s"%env.get('TestTool1_1')) +print("env['TestTool1'] = %s" % env.get('TestTool1')) +print("env['TestTool1_1'] = %s" % env.get('TestTool1_1')) # Test a relative import within a sub dir -print("env['TestTool1_2'] = %s"%env.get('TestTool1_2')) -print("env['TestTool1_2_1'] = %s"%env.get('TestTool1_2_1')) -print("env['TestTool1_2_2'] = %s"%env.get('TestTool1_2_2')) +print("env['TestTool1_2'] = %s" % env.get('TestTool1_2')) +print("env['TestTool1_2_1'] = %s" % env.get('TestTool1_2_1')) +print("env['TestTool1_2_2'] = %s" % env.get('TestTool1_2_2')) diff --git a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_1.py b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_1.py index 584d353..0c11a8c 100644 --- a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_1.py +++ b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['TestTool1_1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_1.py b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_1.py index 62d754b..100c05f 100644 --- a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_1.py +++ b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_1.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['TestTool1_2_1'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_2/__init__.py b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_2/__init__.py index 12c6018..ba65226 100644 --- a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_2/__init__.py +++ b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/TestTool1_2_2/__init__.py @@ -1,4 +1,9 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + def generate(env): env['TestTool1_2_2'] = 1 + def exists(env): return 1 diff --git a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/__init__.py b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/__init__.py index 58fdc93..74b05b3 100644 --- a/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/__init__.py +++ b/test/toolpath/relative_import/image/tools/TestTool1/TestTool1_2/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from . import TestTool1_2_1 from . import TestTool1_2_2 @@ -5,6 +9,7 @@ def generate(env): env['TestTool1_2'] = 1 TestTool1_2_1.generate(env) TestTool1_2_2.generate(env) + def exists(env): TestTool1_2_1.exists(env) TestTool1_2_2.exists(env) diff --git a/test/toolpath/relative_import/image/tools/TestTool1/__init__.py b/test/toolpath/relative_import/image/tools/TestTool1/__init__.py index c479560..8a7f81b 100644 --- a/test/toolpath/relative_import/image/tools/TestTool1/__init__.py +++ b/test/toolpath/relative_import/image/tools/TestTool1/__init__.py @@ -1,9 +1,14 @@ +# SPDX-License-Identifier: MIT +# +# Copyright The SCons Foundation + from . import TestTool1_1 def generate(env): env['TestTool1'] = 1 # Include another tool within the same directory TestTool1_1.generate(env) + def exists(env): TestTool1_1.exists(env) return 1 -- cgit v0.12