From eae074b06a7fccde64d93d397b1ca158f054a849 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Wed, 10 Dec 2008 16:20:12 +0000 Subject: [PATCH] Print "scons: Build interrupted." on stderr, not stdout. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3822 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/CHANGES.txt | 5 +++++ src/engine/SCons/Script/Main.py | 3 ++- test/KeyboardInterrupt.py | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index b6116ed4..8fca6638 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -10,6 +10,11 @@ RELEASE 1.X - XXX + From Steven Knight: + + - Print the message, "scons: Build interrupted." on error output, + not standard output. + From Matthew Wesley: - Copy file attributes so we identify, and can link a shared library diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index db712e6e..6cd57ceb 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -1164,7 +1164,8 @@ def _build_targets(fs, options, targets, target_top): failure_message=failure_message ): if jobs.were_interrupted(): - progress_display("scons: Build interrupted.") + if not options.no_progress and not options.silent: + sys.stderr.write("scons: Build interrupted.\n") global exit_status global this_build_status exit_status = 2 diff --git a/test/KeyboardInterrupt.py b/test/KeyboardInterrupt.py index d5010dd1..f19c2c0e 100644 --- a/test/KeyboardInterrupt.py +++ b/test/KeyboardInterrupt.py @@ -87,8 +87,6 @@ Default( Alias('all', all)) interruptedStr = """\ .*\ -scons: Build interrupted\\. -.*\ scons: building terminated because of errors\\. .*\ scons: writing .sconsign file\\. @@ -98,7 +96,9 @@ scons: writing .sconsign file\\. def runtest(arguments): test.run(arguments='-c') test.run(arguments=arguments, status=2, - stdout=interruptedStr, stderr=r'.*', match=TestSCons.match_re_dotall) + stdout=interruptedStr, + stderr='.*scons: Build interrupted\\.', + match=TestSCons.match_re_dotall) for i in range(2): runtest('-j1') -- 2.26.2