1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#! /bin/sh
d=
cleanup() {
if [ -n "$d" ]; then
d=
rm -rf "$d"
fi
}
trap cleanup EXIT
d=`mktemp -d`
test_runs=0
test_failures=0
t() {
"$@"
local r=$?
: $((test_runs=test_runs+1))
if [ $r -ne 0 ]; then
: $((test_failures=test_failures+1))
echo "not ok $test_runs - $*"
fi
}
echo 1..3
t ./systemd-bootchart -o "$d" -n 2 -r
t ./systemd-bootchart -o "$d" -n 10 -r
t ./systemd-bootchart -o "$d" -n 10 -r -p
if [ $test_failures -ne 0 ]; then
echo "# Failed $test_failures out of $test_runs tests"
exit 1
fi
|