From: Evgeny Vereshchagin Date: Sun, 17 Jan 2016 03:21:52 +0000 (+0000) Subject: tests: fix TEST-03-JOBS X-Git-Tag: v229~133^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b46f4ef10734739f50af16b4df44498fd8518e4d;p=thirdparty%2Fsystemd.git tests: fix TEST-03-JOBS We have JOB UNIT TYPE STATE 1 testsuite.target start waiting 81 end.service start waiting 187 sleep.service start waiting 136 hello.service start waiting 82 testsuite.service start running 135 hello-after-sleep.target start waiting sometimes --- diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh index 42d475fe2fb..4252a9a75d2 100755 --- a/test/TEST-03-JOBS/test-jobs.sh +++ b/test/TEST-03-JOBS/test-jobs.sh @@ -4,9 +4,12 @@ # installed job. systemctl start --no-block hello-after-sleep.target -# sleep is now running, hello/start is waiting. Verify that: + systemctl list-jobs > /root/list-jobs.txt -grep 'sleep\.service.*running' /root/list-jobs.txt || exit 1 +while ! grep 'sleep\.service.*running' /root/list-jobs.txt; do + systemctl list-jobs > /root/list-jobs.txt +done + grep 'hello\.service.*waiting' /root/list-jobs.txt || exit 1 # This is supposed to finish quickly, not wait for sleep to finish.