From 3ddce3f72dec6d9e4cc0381a1c00164264bef39d Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 24 Mar 2018 20:16:14 -0400 Subject: Reenable parallel builds with Pypy --- src/CHANGES.txt | 1 + src/engine/SCons/Script/Main.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 954af11..64c0893 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -25,6 +25,7 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From William Deegan: - Remove long deprecated SCons.Options code and tests. This removes BoolOption,EnumOption, ListOption,PackageOption, and PathOption which have been replaced by *Variable() many years ago. + - Re-Enable parallel SCons (-j) when running via Pypy From Andrew Featherstone - Removed unused --warn options from the man page and source code. diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index c810634..f111d35 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -48,6 +48,7 @@ import sys import time import traceback import sysconfig +import platform import SCons.CacheDir import SCons.Debug @@ -1253,7 +1254,8 @@ def _build_targets(fs, options, targets, target_top): BuildTask.options = options - python_has_threads = sysconfig.get_config_var('WITH_THREAD') + is_pypy = platform.python_implementation() == 'PyPy' + python_has_threads = sysconfig.get_config_var('WITH_THREAD') or is_pypy # to check if python configured with threads. global num_jobs num_jobs = options.num_jobs -- cgit v0.12 From 1724fba161d4123f092ba3f850418d78f58d4bad Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 1 Apr 2018 15:26:19 +0100 Subject: Also search for SConstruct.py, to make VStudio debugging easier --- src/engine/SCons/Script/Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index f111d35..6bdd8fa 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -623,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): current directory. """ if not filelist: - filelist = ['SConstruct', 'Sconstruct', 'sconstruct'] + filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py'] for file in filelist: sfile = os.path.join(dirname, file) if os.path.isfile(sfile): -- cgit v0.12 From c9384f44e9a47e3e2e028667905889fe9206b579 Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 1 Apr 2018 15:52:14 +0100 Subject: update to changes file --- src/CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 64c0893..72dc513 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,6 +7,10 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Richard West: + - Add SConstruct.py to the search path for the root SConstruct file. + Allows easier debugging within Visual Studio + From Daniel Moody: - Set the pickling protocal back to highest which was causing issues with variant dir tests. This will cause issues if reading sconsigns -- cgit v0.12 From ea55726884e48b2b02b1a094dcc38612dd02ad10 Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 1 Apr 2018 23:11:23 +0100 Subject: Added test for the use of SConstruct.py --- test/SConstruct.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/SConstruct.py b/test/SConstruct.py index cebdf04..62d383d 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -39,6 +39,15 @@ scons: \*\*\* No SConstruct file found. wpath = test.workpath() +test.write('SConstruct.py', """ +import os +print("SConstruct.py "+os.getcwd()) +""") + +test.run(arguments = ".", + stdout = test.wrap_stdout(read_str = 'SConstruct.py %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) + test.write('sconstruct', """ import os print("sconstruct "+os.getcwd()) -- cgit v0.12 From d5a21f6b86636a84d8664364e87102775bbb7a70 Mon Sep 17 00:00:00 2001 From: grbd Date: Mon, 2 Apr 2018 12:59:03 +0100 Subject: updates to docs for SConstruct.py --- doc/design/native.xml | 2 +- doc/man/scons.xml | 14 +++++++++----- doc/scons.mod | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/design/native.xml b/doc/design/native.xml index cd4edaf..25f0d95 100644 --- a/doc/design/native.xml +++ b/doc/design/native.xml @@ -64,7 +64,7 @@ By default, the &SCons; utility searches for a file named - &SConstruct;, &Sconstruct; or &sconstruct; (in that order) in the + &SConstruct;, &Sconstruct;, &sconstruct; or &SConstruct.py; (in that order) in the current directory, and reads its configuration from the first file found. A command-line option exists to read a different file name. diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 03a3478..57c5191 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -105,8 +105,9 @@ rebuild them. searches for a file named SConstruct, Sconstruct, -or sconstruct +or +SConstruct.py (in that order) in the current directory and reads its configuration from the first file found. An alternate file name may be @@ -635,8 +636,9 @@ yet have any results in the cache. before searching for the SConstruct, Sconstruct, -or sconstruct +or +SConstruct.py file, or doing anything else. Multiple @@ -649,8 +651,9 @@ equivalent to except that it will search for SConstruct, Sconstruct, -or sconstruct +or +SConstruct.py in the specified directory.) @@ -1658,9 +1661,10 @@ scons --tree=all,prune,status target Walks up the directory structure until an SConstruct , -Sconstruct -or +Sconstruct , sconstruct +or +SConstruct.py file is found, and uses that as the top of the directory tree. If no targets are specified on the command line, diff --git a/doc/scons.mod b/doc/scons.mod index 448a212..5fa8e13 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -137,6 +137,7 @@ SConstruct"> Sconstruct"> sconstruct"> +SConstruct.py"> .sconsign"> src"> -- cgit v0.12 From cc52bda4954ae1327e7d98cfb4418c64a55056ec Mon Sep 17 00:00:00 2001 From: grbd Date: Mon, 2 Apr 2018 20:14:24 +0100 Subject: Added sconstruct.py lowercase --- doc/design/native.xml | 2 +- doc/man/scons.xml | 20 ++++++++++++-------- doc/scons.mod | 1 + src/CHANGES.txt | 2 +- src/engine/SCons/Script/Main.py | 2 +- test/SConstruct.py | 9 +++++++++ 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/design/native.xml b/doc/design/native.xml index 25f0d95..1329817 100644 --- a/doc/design/native.xml +++ b/doc/design/native.xml @@ -64,7 +64,7 @@ By default, the &SCons; utility searches for a file named - &SConstruct;, &Sconstruct;, &sconstruct; or &SConstruct.py; (in that order) in the + &SConstruct;, &Sconstruct;, &sconstruct;, &SConstruct.py or &sconstruct.py; (in that order) in the current directory, and reads its configuration from the first file found. A command-line option exists to read a different file name. diff --git a/doc/man/scons.xml b/doc/man/scons.xml index 57c5191..cd6541b 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -105,9 +105,10 @@ rebuild them. searches for a file named SConstruct, Sconstruct, -sconstruct -or +sconstruct, SConstruct.py +or +sconstruct.py (in that order) in the current directory and reads its configuration from the first file found. An alternate file name may be @@ -636,9 +637,10 @@ yet have any results in the cache. before searching for the SConstruct, Sconstruct, -sconstruct -or +sconstruct, SConstruct.py +or +sconstruct.py file, or doing anything else. Multiple @@ -651,9 +653,10 @@ equivalent to except that it will search for SConstruct, Sconstruct, -sconstruct -or +sconstruct, SConstruct.py +or +sconstruct.py in the specified directory.) @@ -1662,9 +1665,10 @@ scons --tree=all,prune,status target Walks up the directory structure until an SConstruct , Sconstruct , -sconstruct -or +sconstruct , SConstruct.py +or +sconstruct.py file is found, and uses that as the top of the directory tree. If no targets are specified on the command line, diff --git a/doc/scons.mod b/doc/scons.mod index 5fa8e13..1d207c9 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -138,6 +138,7 @@ Sconstruct"> sconstruct"> SConstruct.py"> +sconstruct.py"> .sconsign"> src"> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 72dc513..b7aa9dd 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -8,7 +8,7 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From Richard West: - - Add SConstruct.py to the search path for the root SConstruct file. + - Add SConstruct.py and sconstruct.py to the search path for the root SConstruct file. Allows easier debugging within Visual Studio From Daniel Moody: diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 6bdd8fa..18c493c 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -623,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): current directory. """ if not filelist: - filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py'] + filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'sconstruct.py'] for file in filelist: sfile = os.path.join(dirname, file) if os.path.isfile(sfile): diff --git a/test/SConstruct.py b/test/SConstruct.py index 62d383d..3cf1c02 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -39,6 +39,15 @@ scons: \*\*\* No SConstruct file found. wpath = test.workpath() +test.write('sconstruct.py', """ +import os +print("sconstruct.py "+os.getcwd()) +""") + +test.run(arguments = ".", + stdout = test.wrap_stdout(read_str = 'sconstruct.py %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) + test.write('SConstruct.py', """ import os print("SConstruct.py "+os.getcwd()) -- cgit v0.12 From 5e5cccde062fe18290048ab4adb4b2270fdf6c94 Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Thu, 29 Mar 2018 15:40:06 +0200 Subject: Fix EnvironmentError printing bug EnvironmentErrors does not need to have the attributes strerror or errno. This commit makes the code robust for such situation. One example of such EnvironmentError is CacheDir.py: raise SCons.Errors.EnvironmentError(msg) Signed-off-by: Fredrik Medley --- src/CHANGES.txt | 5 +++++ src/engine/SCons/Errors.py | 11 +++++------ src/engine/SCons/ErrorsTests.py | 25 +++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 64c0893..4d6d191 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -48,6 +48,11 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE Specifically, this fixes the test cases use by Configure.CheckCC() which would fail when using -Wstrict-prototypes. + From Fredrik Medley: + - Fix exception when printing of EnviromentError messages. + Specifically, this fixes error reporting of the race condition when + initializing the cache which error previously was hidden. + RELEASE 3.0.1 - Mon, 12 Nov 2017 15:31:33 -0700 diff --git a/src/engine/SCons/Errors.py b/src/engine/SCons/Errors.py index dae20b2..3746d5d 100644 --- a/src/engine/SCons/Errors.py +++ b/src/engine/SCons/Errors.py @@ -190,14 +190,13 @@ def convert_to_BuildError(status, exc_info=None): # error, which might be different from the target being built # (for example, failure to create the directory in which the # target file will appear). - try: - filename = status.filename - except AttributeError: - filename = None + filename = getattr(status, 'filename', None) + strerror = getattr(status, 'strerror', str(status)) + errno = getattr(status, 'errno', 2) buildError = BuildError( - errstr=status.strerror, - status=status.errno, + errstr=strerror, + status=errno, exitstatus=2, filename=filename, exc_info=exc_info) diff --git a/src/engine/SCons/ErrorsTests.py b/src/engine/SCons/ErrorsTests.py index c38158d..7819580 100644 --- a/src/engine/SCons/ErrorsTests.py +++ b/src/engine/SCons/ErrorsTests.py @@ -23,6 +23,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import errno +import os import sys import unittest @@ -100,6 +102,29 @@ class ErrorsTestCase(unittest.TestCase): except SCons.Errors.ExplicitExit as e: assert e.node == "node" + def test_convert_EnvironmentError_to_BuildError(self): + """Test the convert_to_BuildError function on EnvironmentError + exceptions. + """ + ee = SCons.Errors.EnvironmentError("test env error") + be = SCons.Errors.convert_to_BuildError(ee) + assert be.errstr == "test env error" + assert be.status == 2 + assert be.exitstatus == 2 + assert be.filename is None + + def test_convert_OSError_to_BuildError(self): + """Test the convert_to_BuildError function on OSError + exceptions. + """ + ose = OSError(7, 'test oserror') + be = SCons.Errors.convert_to_BuildError(ose) + assert be.errstr == 'test oserror' + assert be.status == 7 + assert be.exitstatus == 2 + assert be.filename is None + + if __name__ == "__main__": suite = unittest.makeSuite(ErrorsTestCase, 'test_') TestUnit.run(suite) -- cgit v0.12 From e650cc43946737b9d950049ae9964064ea4bf33f Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 10 Apr 2018 19:27:45 -0700 Subject: Fix for issue 3013 (and duplicate 3018). From bitbucket PR: https://bitbucket.org/scons/scons/pull-requests/303 --- src/CHANGES.txt | 3 ++ src/engine/SCons/Taskmaster.py | 9 ++++ test/SideEffect/Issues/3013/files/SConscript | 5 +++ test/SideEffect/Issues/3013/files/SConstruct | 21 ++++++++++ test/SideEffect/Issues/3013/files/test.cpp | 2 + .../Issues/3013/sideffect_with_variantdir.py | 49 ++++++++++++++++++++++ 6 files changed, 89 insertions(+) create mode 100644 test/SideEffect/Issues/3013/files/SConscript create mode 100644 test/SideEffect/Issues/3013/files/SConstruct create mode 100644 test/SideEffect/Issues/3013/files/test.cpp create mode 100644 test/SideEffect/Issues/3013/sideffect_with_variantdir.py diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 64c0893..d084feb 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,6 +7,9 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Bernard Blackham: + - Fixed handling of side-effects in task master (fixes #3013). + From Daniel Moody: - Set the pickling protocal back to highest which was causing issues with variant dir tests. This will cause issues if reading sconsigns diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index 17507a6..1522ca2 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -470,14 +470,23 @@ class Task(object): pending_children.discard(t) for p in t.waiting_parents: parents[p] = parents.get(p, 0) + 1 + t.waiting_parents = set() for t in targets: if t.side_effects is not None: for s in t.side_effects: if s.get_state() == NODE_EXECUTING: s.set_state(NODE_NO_STATE) + + # The side-effects may have been transferred to + # NODE_NO_STATE by executed_with{,out}_callbacks, but was + # not taken out of the waiting parents/pending children + # data structures. Check for that now. + if s.get_state() == NODE_NO_STATE and s.waiting_parents: + pending_children.discard(s) for p in s.waiting_parents: parents[p] = parents.get(p, 0) + 1 + s.waiting_parents = set() for p in s.waiting_s_e: if p.ref_count == 0: self.tm.candidates.append(p) diff --git a/test/SideEffect/Issues/3013/files/SConscript b/test/SideEffect/Issues/3013/files/SConscript new file mode 100644 index 0000000..27da7bb --- /dev/null +++ b/test/SideEffect/Issues/3013/files/SConscript @@ -0,0 +1,5 @@ +Import('env') + +primary = env.make_file('output', 'test.cpp') +this_causes_problems = env.SideEffect('output_side_effect', 'output') + diff --git a/test/SideEffect/Issues/3013/files/SConstruct b/test/SideEffect/Issues/3013/files/SConstruct new file mode 100644 index 0000000..d01a4b7 --- /dev/null +++ b/test/SideEffect/Issues/3013/files/SConstruct @@ -0,0 +1,21 @@ +env = Environment() + +def make_file(target, source, env): + with open(str(target[0]), 'w') as f: + f.write('gobldygook') + with open(str(target[0]) + '_side_effect', 'w') as side_effect: + side_effect.write('anything') + +env.Append( + BUILDERS={'make_file': Builder(action=Action(make_file))} +) + +env.objdir = 'build' + +SConscript( + 'SConscript', + variant_dir=env.objdir, + exports={'env':env}, + duplicate=0 +) + diff --git a/test/SideEffect/Issues/3013/files/test.cpp b/test/SideEffect/Issues/3013/files/test.cpp new file mode 100644 index 0000000..27424b0 --- /dev/null +++ b/test/SideEffect/Issues/3013/files/test.cpp @@ -0,0 +1,2 @@ +void some_function() {} + diff --git a/test/SideEffect/Issues/3013/sideffect_with_variantdir.py b/test/SideEffect/Issues/3013/sideffect_with_variantdir.py new file mode 100644 index 0000000..9ca3eca --- /dev/null +++ b/test/SideEffect/Issues/3013/sideffect_with_variantdir.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# 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__" + +""" +Test materials for Github Issue 3013 submitted by Stefan Ross: +https://github.com/SCons/scons/issues/3013 +""" + +import TestSCons + +test = TestSCons.TestSCons() + +test.dir_fixture('files') + +test.run( + arguments = '-j2' +) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: + -- cgit v0.12 From d2ac0761b978215d2006c4bf892bfb8b2a42172d Mon Sep 17 00:00:00 2001 From: grbd Date: Sun, 15 Apr 2018 12:15:48 +0100 Subject: Added in support for Sconstruct.py --- doc/design/native.xml | 5 +++-- doc/man/scons.xml | 4 ++++ doc/scons.mod | 1 + src/CHANGES.txt | 2 +- src/engine/SCons/Script/Main.py | 2 +- test/SConstruct.py | 9 +++++++++ 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/design/native.xml b/doc/design/native.xml index 1329817..97d5831 100644 --- a/doc/design/native.xml +++ b/doc/design/native.xml @@ -64,8 +64,9 @@ By default, the &SCons; utility searches for a file named - &SConstruct;, &Sconstruct;, &sconstruct;, &SConstruct.py or &sconstruct.py; (in that order) in the - current directory, and reads its configuration from the first file + &SConstruct;, &Sconstruct;, &sconstruct;, &SConstruct.py, &Sconstruct.py + or &sconstruct.py; (in that order) in the current directory, + and reads its configuration from the first file found. A command-line option exists to read a different file name. diff --git a/doc/man/scons.xml b/doc/man/scons.xml index cd6541b..abbed4f 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -107,6 +107,7 @@ searches for a file named Sconstruct, sconstruct, SConstruct.py +Sconstruct.py or sconstruct.py (in that order) in the current directory and reads its @@ -639,6 +640,7 @@ before searching for the Sconstruct, sconstruct, SConstruct.py +Sconstruct.py or sconstruct.py file, or doing anything @@ -655,6 +657,7 @@ except that it will search for Sconstruct, sconstruct, SConstruct.py +Sconstruct.py or sconstruct.py in the specified directory.) @@ -1667,6 +1670,7 @@ scons --tree=all,prune,status target Sconstruct , sconstruct , SConstruct.py +Sconstruct.py or sconstruct.py file is found, and uses that diff --git a/doc/scons.mod b/doc/scons.mod index 1d207c9..974ec02 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -138,6 +138,7 @@ Sconstruct"> sconstruct"> SConstruct.py"> +Sconstruct.py"> sconstruct.py"> .sconsign"> src"> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index be4e0dd..093c628 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -8,7 +8,7 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From Richard West: - - Add SConstruct.py and sconstruct.py to the search path for the root SConstruct file. + - Add SConstruct.py, Sconstruct.py, sconstruct.py to the search path for the root SConstruct file. Allows easier debugging within Visual Studio From Bernard Blackham: diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 18c493c..923ef1e 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -623,7 +623,7 @@ def _SConstruct_exists(dirname='', repositories=[], filelist=None): current directory. """ if not filelist: - filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'sconstruct.py'] + filelist = ['SConstruct', 'Sconstruct', 'sconstruct', 'SConstruct.py', 'Sconstruct.py', 'sconstruct.py'] for file in filelist: sfile = os.path.join(dirname, file) if os.path.isfile(sfile): diff --git a/test/SConstruct.py b/test/SConstruct.py index 3cf1c02..8bc8617 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -48,6 +48,15 @@ test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'sconstruct.py %s\n' % wpath, build_str = "scons: `.' is up to date.\n")) +test.write('Sconstruct.py', """ +import os +print("sconstruct.py "+os.getcwd()) +""") + +test.run(arguments = ".", + stdout = test.wrap_stdout(read_str = 'sconstruct.py %s\n' % wpath, + build_str = "scons: `.' is up to date.\n")) + test.write('SConstruct.py', """ import os print("SConstruct.py "+os.getcwd()) -- cgit v0.12