diff options
author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2015-07-27 19:37:20 +0900 |
---|---|---|
committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2015-07-28 13:03:01 +0900 |
commit | 6a49292c267cb030bc8c13d62c8f493b744b571b (patch) | |
tree | ad1dba0b2c40e4b729a9762ce74f4a1cadcc9023 /runtest.rb | |
parent | 383cfe0344b5058512a2a7c0ceba87860bdf81ab (diff) | |
download | kati-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-x | runtest.rb | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -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 |