diff options
author | Tom Tanner <ttanner2@bloomberg.net> | 2013-09-26 17:01:53 (GMT) |
---|---|---|
committer | Tom Tanner <ttanner2@bloomberg.net> | 2013-09-26 17:01:53 (GMT) |
commit | 088338d0ac7b7f4c5ae712c46d0ba8a95448ff9b (patch) | |
tree | 563be1c134096291c3d7cee90ce6b1892e1be06f /src/engine | |
parent | 328e541f40849c270fc75f0932594d18d2e6340b (diff) | |
download | SCons-088338d0ac7b7f4c5ae712c46d0ba8a95448ff9b.zip SCons-088338d0ac7b7f4c5ae712c46d0ba8a95448ff9b.tar.gz SCons-088338d0ac7b7f4c5ae712c46d0ba8a95448ff9b.tar.bz2 |
Addition of warning if build doesn't build expected targets.
Added option to runtest.py to stop on first error
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Node/__init__.py | 8 | ||||
-rw-r--r-- | src/engine/SCons/Script/Main.py | 1 | ||||
-rw-r--r-- | src/engine/SCons/Warnings.py | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 992284d..56e4694 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -57,6 +57,10 @@ from SCons.Debug import Trace def classname(obj): return str(obj.__class__).split('.')[-1] +# Set to false if we're doing a dry run. There's more than one of these +# little treats +do_store_info = True + # Node states # # These are in "priority" order, so that the maximum value for any @@ -385,6 +389,10 @@ class Node(object): self.clear() + if not self.exists() and do_store_info: + SCons.Warnings.warn(SCons.Warnings.TargetNotBuiltWarning, + "Cannot find target " + str(self) + " after building") + self.ninfo.update(self) def visited(self): diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 837c103..191c7b5 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -1083,6 +1083,7 @@ def _build_targets(fs, options, targets, target_top): SCons.Action.print_actions = not options.silent SCons.Action.execute_actions = not options.no_exec SCons.Node.FS.do_store_info = not options.no_exec + SCons.Node.do_store_info = not options.no_exec SCons.SConf.dryrun = options.no_exec if options.diskcheck: diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py index a260c4a..ca6acee 100644 --- a/src/engine/SCons/Warnings.py +++ b/src/engine/SCons/Warnings.py @@ -42,6 +42,9 @@ class WarningOnByDefault(Warning): # NOTE: If you add a new warning class, add it to the man page, too! +class TargetNotBuiltWarning(Warning): # Should go to OnByDefault + pass + class CacheWriteErrorWarning(Warning): pass |