mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-08-30 05:50:12 +03:00
TEST-03-JOBS/test.sh: do not output the "failed" if it does not exist
This commit is contained in:
@ -21,10 +21,10 @@ run_qemu() {
|
|||||||
mkdir -p $TESTDIR/root
|
mkdir -p $TESTDIR/root
|
||||||
mount ${LOOPDEV}p1 $TESTDIR/root
|
mount ${LOOPDEV}p1 $TESTDIR/root
|
||||||
[[ -e $TESTDIR/root/testok ]] && ret=0
|
[[ -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
|
cp -a $TESTDIR/root/var/log/journal $TESTDIR
|
||||||
umount $TESTDIR/root
|
umount $TESTDIR/root
|
||||||
cat $TESTDIR/failed
|
[[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
|
||||||
ls -l $TESTDIR/journal/*/*.journal
|
ls -l $TESTDIR/journal/*/*.journal
|
||||||
test -s $TESTDIR/failed && ret=$(($ret+1))
|
test -s $TESTDIR/failed && ret=$(($ret+1))
|
||||||
return $ret
|
return $ret
|
||||||
@ -35,9 +35,9 @@ run_nspawn() {
|
|||||||
../../systemd-nspawn -b -D $TESTDIR/nspawn-root /usr/lib/systemd/systemd
|
../../systemd-nspawn -b -D $TESTDIR/nspawn-root /usr/lib/systemd/systemd
|
||||||
ret=1
|
ret=1
|
||||||
[[ -e $TESTDIR/nspawn-root/testok ]] && ret=0
|
[[ -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
|
cp -a $TESTDIR/nspawn-root/var/log/journal $TESTDIR
|
||||||
cat $TESTDIR/failed
|
[[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
|
||||||
ls -l $TESTDIR/journal/*/*.journal
|
ls -l $TESTDIR/journal/*/*.journal
|
||||||
test -s $TESTDIR/failed && ret=$(($ret+1))
|
test -s $TESTDIR/failed && ret=$(($ret+1))
|
||||||
return $ret
|
return $ret
|
||||||
|
Reference in New Issue
Block a user