2016-04-05 17:04:40 -05:00
|
|
|
#!/bin/sh
|
2016-04-11 12:21:16 -05:00
|
|
|
#
|
|
|
|
# DO NOT EDIT - this file is generated from run_unit.sh.in.
|
|
|
|
#
|
2016-04-05 17:04:40 -05:00
|
|
|
|
|
|
|
export LOOL_LOGLEVEL=trace
|
|
|
|
|
2016-04-11 12:21:16 -05:00
|
|
|
abs_top_builddir="@abs_top_builddir@"
|
|
|
|
|
2016-04-06 13:50:55 -05:00
|
|
|
mkdir -p test_output
|
|
|
|
|
|
|
|
# result logging
|
|
|
|
echo > run_unit.sh.trs
|
|
|
|
|
2016-04-08 11:36:08 -05:00
|
|
|
for tst in timeout storage prefork; do
|
2016-04-06 13:50:55 -05:00
|
|
|
tst_log="test_output/$tst.log"
|
2016-04-07 14:15:18 -05:00
|
|
|
echo "Running test: $tst | $tst_log ...";
|
2016-04-11 12:21:16 -05:00
|
|
|
if ../loolwsd --systemplate="@SYSTEMPLATE_PATH@" --lotemplate="@LO_PATH@" \
|
|
|
|
--childroot="@JAILS_PATH@" --unitlib=".libs/unit-$tst.so" 2> "$tst_log"; then
|
2016-04-06 13:50:55 -05:00
|
|
|
echo "Test $tst passed."
|
|
|
|
echo ":test-result: PASS $tst" >> run_unit.sh.trs
|
2016-04-05 17:04:40 -05:00
|
|
|
else
|
2016-04-06 13:50:55 -05:00
|
|
|
cat "$tst_log"
|
|
|
|
echo "============================================================="
|
|
|
|
echo "Test failed on unit: $tst re-run with:"
|
2016-04-11 12:21:16 -05:00
|
|
|
echo " $ gdb --args ../loolwsd --systemplate=\"@SYSTEMPLATE_PATH@\" --lotemplate=\"@LO_PATH@\" \\"
|
|
|
|
echo " --childroot=\"@JAILS_PATH@\" --unitlib=\".libs/unit-$tst.so\""
|
2016-04-06 13:50:55 -05:00
|
|
|
echo "============================================================="
|
|
|
|
echo ":test-result: FAIL $tst" >> run_unit.sh.trs
|
2016-04-05 17:04:40 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|