aboutsummaryrefslogtreecommitdiff
path: root/runtest.rb
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2016-04-28 16:50:46 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2016-04-28 16:50:46 +0900
commit2d2ed95265fe5fed97953af68eef5479e5c7e5e5 (patch)
tree98019f088158869c6b73172f06cfe212d8e89888 /runtest.rb
parentd07e29712544000b65cc036677d4752961e815b6 (diff)
downloadkati-2d2ed95265fe5fed97953af68eef5479e5c7e5e5.tar.gz
Explicitly use SHELL=/bin/bash
Also use override in tests which set $(SHELL)
Diffstat (limited to 'runtest.rb')
-rwxr-xr-xruntest.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtest.rb b/runtest.rb
index 2bb70ee..ce3b551 100755
--- a/runtest.rb
+++ b/runtest.rb
@@ -137,7 +137,7 @@ def normalize_make_log(expected, mk, via_ninja)
# GNU make 4.0 has this output.
expected.gsub!(/Makefile:\d+: commands for target ".*?" failed\n/, '')
# We treat some warnings as errors.
- expected.gsub!(/^\/bin\/sh: line 0: /, '')
+ expected.gsub!(/^\/bin\/(ba)?sh: line 0: /, '')
# We print out some ninja warnings in some tests to match what we expect
# ninja to produce. Remove them if we're not testing ninja.
if !via_ninja
@@ -168,6 +168,8 @@ def normalize_kati_log(output)
output
end
+bash_var = ' SHELL=/bin/bash'
+
run_make_test = proc do |mk|
c = File.read(mk)
expected_failure = false
@@ -219,6 +221,7 @@ run_make_test = proc do |mk|
if via_ninja || is_silent_test
cmd += ' -s'
end
+ cmd += bash_var
cmd += " #{tc} 2>&1"
res = `#{cmd}`
res = normalize_make_log(res, mk, via_ninja)
@@ -246,6 +249,7 @@ run_make_test = proc do |mk|
if is_silent_test
cmd += ' -s'
end
+ cmd += bash_var
if !gen_all_targets || mk =~ /makecmdgoals/
cmd += " #{tc}"
end
@@ -328,6 +332,7 @@ run_shell_test = proc do |sh|
if is_ninja_test
cmd += ' -s'
end
+ cmd += bash_var
expected = IO.popen(cmd, 'r:binary', &:read)
cleanup
@@ -344,6 +349,7 @@ run_shell_test = proc do |sh|
cmd = "sh ../../#{sh} ../../kati --use_cache -log_dir=."
end
end
+ cmd += bash_var
output = IO.popen(cmd, 'r:binary', &:read)