aboutsummaryrefslogtreecommitdiff
path: root/runtest.rb
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-27 19:37:20 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-28 13:03:01 +0900
commit6a49292c267cb030bc8c13d62c8f493b744b571b (patch)
treead1dba0b2c40e4b729a9762ce74f4a1cadcc9023 /runtest.rb
parent383cfe0344b5058512a2a7c0ceba87860bdf81ab (diff)
downloadkati-6a49292c267cb030bc8c13d62c8f493b744b571b.tar.gz
[C++] Let runtest.rb -c -n pass
- Add TODO(ninja) and use it in failing tests - Redirect stderr to stdout for ./ninja.sh - Do not replace tabs with whitespaces
Diffstat (limited to 'runtest.rb')
-rwxr-xr-xruntest.rb24
1 files changed, 17 insertions, 7 deletions
diff --git a/runtest.rb b/runtest.rb
index 856846f..e2458ce 100755
--- a/runtest.rb
+++ b/runtest.rb
@@ -131,12 +131,21 @@ end
run_make_test = proc do |mk|
c = File.read(mk)
- expected_failure = c =~ /\A# TODO(?:\((go|c)\))?/
- if $1
- if $1 == 'go' && ckati
- expected_failure = false
- elsif $1 == 'c' && !ckati
- expected_failure = false
+ expected_failure = false
+ if c =~ /\A# TODO(?:\(([a-z|]+)\))?/
+ if $1
+ todos = $1.split('|')
+ if todos.include?('go') && !ckati
+ expected_failure = true
+ end
+ if todos.include?('c') && ckati
+ expected_failure = true
+ end
+ if todos.include?('ninja') && via_ninja
+ expected_failure = true
+ end
+ else
+ expected_failure = true
end
end
@@ -185,7 +194,8 @@ run_make_test = proc do |mk|
cmd += " #{tc} 2>&1"
res = IO.popen(cmd, 'r:binary', &:read)
if via_ninja && File.exist?('build.ninja') && File.exists?('ninja.sh')
- res += normalize_ninja_log(IO.popen('./ninja.sh -j1 -v', 'r:binary', &:read))
+ log = IO.popen('./ninja.sh -j1 -v 2>&1', 'r:binary', &:read)
+ res += normalize_ninja_log(log)
end
res = normalize_kati_log(res)
output += "=== #{tc} ===\n" + res