diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index adef4837..2f05f703 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -165,11 +165,14 @@ sub take_job { } my $kill_i3 = sub { - # Don’t bother killing i3 when we haven’t started it - return if $dont_start; - my $kill_cv = AnyEvent->condvar; + # Don’t bother killing i3 when we haven’t started it + if ($dont_start) { + $kill_cv->send(); + return $kill_cv; + } + # When measuring code coverage, try to exit i3 cleanly (otherwise, .gcda # files are not written) and fallback to killing it if ($coverage_testing || $valgrind) {