summaryrefslogtreecommitdiffstats
path: root/test/option/option-f.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/option/option-f.py')
-rw-r--r--test/option/option-f.py130
1 files changed, 83 insertions, 47 deletions
diff --git a/test/option/option-f.py b/test/option/option-f.py
index 94e7e46..e1343a6 100644
--- a/test/option/option-f.py
+++ b/test/option/option-f.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__"
import os
@@ -54,56 +53,93 @@ print("Build2 "+ os.getcwd())
wpath = test.workpath()
-test.run(arguments = '-f SConscript .',
- stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '-f %s .' % subdir_BuildThis,
- stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '--file=SConscript .',
- stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '--file=%s .' % subdir_BuildThis,
- stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '--makefile=SConscript .',
- stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '--makefile=%s .' % subdir_BuildThis,
- stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '--sconstruct=SConscript .',
- stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '--sconstruct=%s .' % subdir_BuildThis,
- stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-test.run(arguments = '-f - .', stdin = """
+test.run(
+ arguments='-f SConscript .',
+ stdout=test.wrap_stdout(
+ read_str='SConscript %s\n' % wpath, build_str="scons: `.' is up to date.\n"
+ ),
+)
+
+test.run(
+ arguments='-f %s .' % subdir_BuildThis,
+ stdout=test.wrap_stdout(
+ read_str='subdir/BuildThis %s\n' % wpath,
+ build_str="scons: `.' is up to date.\n",
+ ),
+)
+
+test.run(
+ arguments='--file=SConscript .',
+ stdout=test.wrap_stdout(
+ read_str='SConscript %s\n' % wpath, build_str="scons: `.' is up to date.\n"
+ ),
+)
+
+test.run(
+ arguments='--file=%s .' % subdir_BuildThis,
+ stdout=test.wrap_stdout(
+ read_str='subdir/BuildThis %s\n' % wpath,
+ build_str="scons: `.' is up to date.\n",
+ ),
+)
+
+test.run(
+ arguments='--makefile=SConscript .',
+ stdout=test.wrap_stdout(
+ read_str='SConscript %s\n' % wpath, build_str="scons: `.' is up to date.\n"
+ ),
+)
+
+test.run(
+ arguments='--makefile=%s .' % subdir_BuildThis,
+ stdout=test.wrap_stdout(
+ read_str='subdir/BuildThis %s\n' % wpath,
+ build_str="scons: `.' is up to date.\n",
+ ),
+)
+
+test.run(
+ arguments='--sconstruct=SConscript .',
+ stdout=test.wrap_stdout(
+ read_str='SConscript %s\n' % wpath, build_str="scons: `.' is up to date.\n"
+ ),
+)
+
+test.run(
+ arguments='--sconstruct=%s .' % subdir_BuildThis,
+ stdout=test.wrap_stdout(
+ read_str='subdir/BuildThis %s\n' % wpath,
+ build_str="scons: `.' is up to date.\n",
+ ),
+)
+
+test.run(
+ arguments='-f - .',
+ stdin="""
DefaultEnvironment(tools=[])
import os
print("STDIN " + os.getcwd())
""",
- stdout = test.wrap_stdout(read_str = 'STDIN %s\n' % wpath,
- build_str = "scons: `.' is up to date.\n"))
-
-expect = test.wrap_stdout(read_str = 'Build2 %s\nSConscript %s\n' % (wpath, wpath),
- build_str = "scons: `.' is up to date.\n")
-test.run(arguments = '-f Build2 -f SConscript .', stdout=expect)
+ stdout=test.wrap_stdout(
+ read_str='STDIN %s\n' % wpath, build_str="scons: `.' is up to date.\n"
+ ),
+)
+
+expect = test.wrap_stdout(
+ read_str='Build2 %s\nSConscript %s\n' % (wpath, wpath),
+ build_str="scons: `.' is up to date.\n",
+)
+test.run(arguments='-f Build2 -f SConscript .', stdout=expect)
+
+test.run(
+ arguments='-f no_such_file .',
+ stdout=test.wrap_stdout("scons: `.' is up to date.\n"),
+ stderr=None,
+)
-test.run(arguments = '-f no_such_file .',
- stdout = test.wrap_stdout("scons: `.' is up to date.\n"),
- stderr = None)
expect = """
scons: warning: Calling missing SConscript without error is deprecated.
-Transition by adding must_exist=0 to SConscript calls.
+Transition by adding must_exist=False to SConscript calls.
Missing SConscript 'no_such_file'"""
stderr = test.stderr()
test.must_contain_all(test.stderr(), expect)