diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-24 18:34:47 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-24 18:34:47 +0300 |
commit | 3a0117c850a69b70bf2a39e9f2e61220a1e7f228 (patch) | |
tree | c8089cc81be38649d0a3f9ab2e333fa578f00f33 | |
parent | 26fad863bad65ab66ca34b0879b13868d8aa0d97 (diff) | |
download | rneovim-3a0117c850a69b70bf2a39e9f2e61220a1e7f228.tar.gz rneovim-3a0117c850a69b70bf2a39e9f2e61220a1e7f228.tar.bz2 rneovim-3a0117c850a69b70bf2a39e9f2e61220a1e7f228.zip |
ci: Do not accidentally kill something unneeded
-rw-r--r-- | ci/common/suite.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 75bdb5abfb..986c145736 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -87,7 +87,8 @@ run_test_wd() { local restarts=5 local prev_tmpsize=-1 while test $restarts -gt 0 ; do - : > "${status_file}" + : > "$status_file" + : > "$sid_file" setsid \ env \ output_file="$output_file" \ @@ -114,8 +115,18 @@ run_test_wd() { done restarts=$(( restarts - 1 )) if test "$(stat -c "%s" "$status_file")" -eq 0 ; then - # status file not updated, assuming hang + # Status file not updated, assuming hang + + # SID not known, this should not ever happen + if test "$(stat -c "%s" "$sid_file")" -eq 0 ; then + fail "$test_name" E "Shell did not run" + break + fi + + # Kill all processes which belong to one session: should get rid of test + # processes as well as sh itself. pkill -KILL -s$(cat "$sid_file") + if test $restarts -eq 0 ; then if test "x$hang_ok" = "x" ; then fail "$test_name" E "Test hang up" |