diff options
author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2015-10-03 11:25:15 +0900 |
---|---|---|
committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2015-10-03 11:25:15 +0900 |
commit | 8562057586c7b96fbbd6dcc2eb70a218d66b5c71 (patch) | |
tree | a00ac0812e80d9cc2f93b1892f268152dcfb93ce | |
parent | af2b7c676c38a3a265bd1a52a97d3c3793c8f707 (diff) | |
download | kati-8562057586c7b96fbbd6dcc2eb70a218d66b5c71.tar.gz |
[C++] Test --gen_all_targets on travis
-rw-r--r-- | .travis.yml | 1 | ||||
-rwxr-xr-x | runtest.rb | 16 |
2 files changed, 16 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 9ffcb7c..9d2dcc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,5 @@ script: - make -j4 ckati - ruby runtest.rb -c - ruby runtest.rb -c -n + - ruby runtest.rb -c -n -a
\ No newline at end of file @@ -28,6 +28,9 @@ while true via_ninja = true ARGV.shift ENV['NINJA_STATUS'] = 'NINJACMD: ' + elsif ARGV[0] == '-a' + gen_all_targets = true + ARGV.shift elsif ARGV[0] == '-v' show_failing = true ARGV.shift @@ -220,13 +223,24 @@ run_make_test = proc do |mk| if via_ninja cmd += ' --ninja' end + if gen_all_targets + if !ckati || !via_ninja + raise "-a should be used with -c -n" + end + cmd += ' --gen_all_targets' + end if is_silent_test cmd += ' -s' end cmd += " #{tc} 2>&1" res = IO.popen(cmd, 'r:binary', &:read) if via_ninja && File.exist?('build.ninja') && File.exists?('ninja.sh') - log = IO.popen('./ninja.sh -j1 -v 2>&1', 'r:binary', &:read) + cmd = './ninja.sh -j1 -v' + if gen_all_targets + cmd += " #{tc}" + end + cmd += ' 2>&1' + log = IO.popen(cmd, 'r:binary', &:read) res += normalize_ninja_log(log, mk) end res = normalize_kati_log(res) |