aboutsummaryrefslogtreecommitdiff
path: root/runtest.rb
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-10-02 11:06:49 -0700
committerColin Cross <ccross@android.com>2015-10-02 11:10:08 -0700
commitdf1104457624e0055f2bd5d7b4532bf58958d6bc (patch)
tree1c32fe54d11caaa578cf0fef369fd1c6fe0cde8c /runtest.rb
parenta62b02a1251a0f6c452a25fce03258f12472507f (diff)
Fix ninja tests if NINJA_STATUS is set
If NINJA_STATUS is set in the environment when running runtest.rb -c -n the regexp to match ninja status lines may not match, causing all the tests to fail. Set NINJA_STATUS to a known value that is easy to match for. Change-Id: Ice892341a252ca305f770d5c92d9716ee857156b
Diffstat (limited to 'runtest.rb')
-rwxr-xr-xruntest.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtest.rb b/runtest.rb
index e9fb650..6ca14d0 100755
--- a/runtest.rb
+++ b/runtest.rb
@@ -27,6 +27,7 @@ while true
elsif ARGV[0] == '-n'
via_ninja = true
ARGV.shift
+ ENV['NINJA_STATUS'] = 'NINJACMD: '
elsif ARGV[0] == '-v'
show_failing = true
ARGV.shift
@@ -93,7 +94,7 @@ def run_in_testdir(test_filename)
end
def normalize_ninja_log(log, mk)
- log.gsub!(/^\[\d+\/\d+\] .*\n/, '')
+ log.gsub!(/^NINJACMD: .*\n/, '')
log.gsub!(/^ninja: no work to do\.\n/, '')
log.gsub!(/^ninja: error: (.*, needed by .*),.*/,
'*** No rule to make target \\1.')