summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Gross <grossag@vmware.com>2019-12-03 22:40:09 (GMT)
committerAdam Gross <grossag@vmware.com>2019-12-03 22:40:09 (GMT)
commitb2866a6821ba0575535e259a6a74e911c0d7c735 (patch)
tree8ddf4abb58203a862ba808ceb78870801e6bf98d
parent20e42843dd1266e13f7bc5c9a89b08541e98d64c (diff)
downloadSCons-b2866a6821ba0575535e259a6a74e911c0d7c735.zip
SCons-b2866a6821ba0575535e259a6a74e911c0d7c735.tar.gz
SCons-b2866a6821ba0575535e259a6a74e911c0d7c735.tar.bz2
Fix some more tests
Reverts some of the changes I made previously in my diff.
-rw-r--r--test/Batch/action-changed.py4
-rw-r--r--test/explain/basic.py38
2 files changed, 15 insertions, 27 deletions
diff --git a/test/Batch/action-changed.py b/test/Batch/action-changed.py
index 33c026e..da5115e 100644
--- a/test/Batch/action-changed.py
+++ b/test/Batch/action-changed.py
@@ -59,8 +59,10 @@ os.chmod(test.workpath('build.py'), 0o755)
build_py_workpath = test.workpath('build.py')
+# Provide IMPLICIT_COMMAND_DEPENDENCIES=2 so we take a dependency on build.py.
+# Without that, we only scan the first entry in the action string.
test.write('SConstruct', """
-env = Environment()
+env = Environment(IMPLICIT_COMMAND_DEPENDENCIES=2)
env.PrependENVPath('PATHEXT', '.PY')
bb = Action(r'%(_python_)s "%(build_py_workpath)s" $CHANGED_TARGETS -- $CHANGED_SOURCES',
batch_key=True,
diff --git a/test/explain/basic.py b/test/explain/basic.py
index 2d57d35..46ce6bc 100644
--- a/test/explain/basic.py
+++ b/test/explain/basic.py
@@ -335,7 +335,6 @@ scons: rebuilding `file3' because:
->Depends
->Implicit
Old:%(_python_)s New:%(_python_)s
- Old:%(cat_py)s New:%(cat_py)s
%(_python_)s %(cat_py)s file3 zzz yyy xxx
""" % locals())
@@ -355,21 +354,12 @@ env.AddPostAction(f3, r'%(_python_)s %(cat_py)s ${TARGET}.yyy $SOURCES yyy')
env.AddPreAction(f3, r'%(_python_)s %(cat_py)s ${TARGET}.alt $SOURCES')
""" % locals())
-# Because Action.get_implicit_deps() scans the entire action string, we do take
-# the additional "yyy" as a dependency. It already was a source, so it now is
-# considered to be a dependency ordering change.
expect = test.wrap_stdout("""\
-scons: rebuilding `file3' because:
- the dependency order changed:
- ->Sources
- Old:zzz New:zzz
- Old:yyy New:yyy
- Old:xxx New:xxx
- ->Depends
- ->Implicit
- Old:%(_python_)s New:%(_python_)s
- Old:%(cat_py)s New:%(cat_py)s
- Old:None New:yyy
+scons: rebuilding `file3' because the build action changed:
+ old: %(python)s %(cat_py)s $TARGET $SOURCES
+ new: %(_python_)s %(cat_py)s ${TARGET}.alt $SOURCES
+ %(python)s %(cat_py)s $TARGET $SOURCES
+ %(_python_)s %(cat_py)s ${TARGET}.yyy $SOURCES yyy
%(_python_)s %(cat_py)s file3.alt zzz yyy xxx
%(_python_)s %(cat_py)s file3 zzz yyy xxx
%(_python_)s %(cat_py)s file3.yyy zzz yyy xxx yyy
@@ -394,17 +384,13 @@ env.AddPreAction(f3, r'%(_python_)s %(cat_py)s ${TARGET}.alt $SOURCES')
""" % locals())
expect = test.wrap_stdout("""\
-scons: rebuilding `file3' because:
- the dependency order changed:
- ->Sources
- Old:zzz New:zzz
- Old:yyy New:yyy
- Old:xxx New:xxx
- ->Depends
- ->Implicit
- Old:%(_python_)s New:%(_python_)s
- Old:%(cat_py)s New:%(cat_py)s
- Old:yyy New:xxx
+scons: rebuilding `file3' because the build action changed:
+ old: %(_python_)s %(cat_py)s ${TARGET}.alt $SOURCES
+ %(python)s %(cat_py)s $TARGET $SOURCES
+ %(_python_)s %(cat_py)s ${TARGET}.yyy $SOURCES yyy
+ new: %(_python_)s %(cat_py)s ${TARGET}.alt $SOURCES
+ %(python)s %(cat_py)s $TARGET $SOURCES
+ %(_python_)s %(cat_py)s ${TARGET}.yyy $SOURCES xxx
%(_python_)s %(cat_py)s file3.alt zzz yyy xxx
%(_python_)s %(cat_py)s file3 zzz yyy xxx
%(_python_)s %(cat_py)s file3.yyy zzz yyy xxx xxx