diff options
| author | ZyX <kp-pav@yandex.ru> | 2017-04-04 03:58:10 +0300 |
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-04-04 03:58:10 +0300 |
| commit | 644db2165e3437be66d11e46624124c99cfb810e (patch) | |
| tree | e9698da415a61f51a31fb761692b48656e70a755 /ci/common | |
| parent | 6afa7d66cd6343c7c0114e6b3e08c592e169df43 (diff) | |
| download | rneovim-644db2165e3437be66d11e46624124c99cfb810e.tar.gz rneovim-644db2165e3437be66d11e46624124c99cfb810e.tar.bz2 rneovim-644db2165e3437be66d11e46624124c99cfb810e.zip | |
ci: Clean up when restarting single includes test
Diffstat (limited to 'ci/common')
| -rw-r--r-- | ci/common/suite.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 5c79ce2718..44a560c50a 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -57,13 +57,21 @@ run_test() { run_test_wd() { local timeout="$1" test $# -gt 0 && shift + local cmd="$1" test $# -gt 0 && shift + + local restart_cmd="$1" + : ${restart_cmd:=true} + test $# -gt 0 && shift + local test_name="$1" : ${test_name:=$cmd} test $# -gt 0 && shift + local output_file="$(mktemp)" local status_file="$(mktemp)" + local restarts=5 local prev_tmpsize=-1 while test $restarts -gt 0 ; do @@ -92,6 +100,7 @@ run_test_wd() { # status file not updated, assuming hang kill -KILL $pid echo "Test ${test_name} hang up, restarting" + eval "$restart_cmd" else local new_failed="$(cat "$status_file")" if test "x$new_failed" != "x0" ; then |