summaryrefslogtreecommitdiffstats
path: root/test/TEST-03-JOBS
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-09-17 01:07:43 +0200
committerHarald Hoyer <harald@redhat.com>2013-09-17 22:19:17 +0200
commit41a5ef639b248aa3d10609d9af5d0043b909d93c (patch)
tree9cfa5a572313fd9d451f57828465145718df3dae /test/TEST-03-JOBS
parentTEST-01-BASIC, TEST-02-CRYPTSETUP: fixed strip (diff)
downloadsystemd-41a5ef639b248aa3d10609d9af5d0043b909d93c.tar.xz
systemd-41a5ef639b248aa3d10609d9af5d0043b909d93c.zip
TEST-03-JOBS/test.sh: do not output the "failed" if it does not exist
Diffstat (limited to 'test/TEST-03-JOBS')
-rwxr-xr-xtest/TEST-03-JOBS/test.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/TEST-03-JOBS/test.sh b/test/TEST-03-JOBS/test.sh
index 6440d1f54b..02fd8b9ce8 100755
--- a/test/TEST-03-JOBS/test.sh
+++ b/test/TEST-03-JOBS/test.sh
@@ -21,10 +21,10 @@ run_qemu() {
mkdir -p $TESTDIR/root
mount ${LOOPDEV}p1 $TESTDIR/root
[[ -e $TESTDIR/root/testok ]] && ret=0
- cp -a $TESTDIR/root/failed $TESTDIR
+ [[ -f $TESTDIR/root/failed ]] && cp -a $TESTDIR/root/failed $TESTDIR
cp -a $TESTDIR/root/var/log/journal $TESTDIR
umount $TESTDIR/root
- cat $TESTDIR/failed
+ [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
ls -l $TESTDIR/journal/*/*.journal
test -s $TESTDIR/failed && ret=$(($ret+1))
return $ret
@@ -35,9 +35,9 @@ run_nspawn() {
../../systemd-nspawn -b -D $TESTDIR/nspawn-root /usr/lib/systemd/systemd
ret=1
[[ -e $TESTDIR/nspawn-root/testok ]] && ret=0
- cp -a $TESTDIR/nspawn-root/failed $TESTDIR
+ [[ -f $TESTDIR/root/failed ]] && cp -a $TESTDIR/nspawn-root/failed $TESTDIR
cp -a $TESTDIR/nspawn-root/var/log/journal $TESTDIR
- cat $TESTDIR/failed
+ [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
ls -l $TESTDIR/journal/*/*.journal
test -s $TESTDIR/failed && ret=$(($ret+1))
return $ret