6a990dfb61
Enforce user being 'lool' for setcap binaries loolmount and loolforkit. Add warnings if configured without --enable-debug. Developers should pass --enable-debug to configure.
43 lines
1.3 KiB
Bash
Executable file
43 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# DO NOT EDIT - this file is generated from run_unit.sh.in.
|
|
#
|
|
|
|
export LOOL_LOGLEVEL=trace
|
|
|
|
abs_top_builddir="@abs_top_builddir@"
|
|
test_build="${abs_top_builddir}/test"
|
|
test_output="$test_build/run_unit.sh.trs"
|
|
test_log_output="$test_build/test_output"
|
|
|
|
mkdir -p $test_log_output
|
|
|
|
if test "z@ENABLE_DEBUG@" != "ztrue"; then
|
|
echo ""
|
|
echo "It is necessary to configure with --enable-debug for unit tests to pass"
|
|
echo ""
|
|
echo ":test-result: FAIL $tst" > $test_output
|
|
exit 1;
|
|
fi
|
|
|
|
# result logging
|
|
echo > run_unit.sh.trs
|
|
|
|
for tst in timeout storage prefork; do
|
|
tst_log="test_output/$tst.log"
|
|
echo "Running test: $tst | $tst_log ...";
|
|
if ../loolwsd --systemplate="@SYSTEMPLATE_PATH@" --lotemplate="@LO_PATH@" \
|
|
--childroot="@JAILS_PATH@" --unitlib=".libs/unit-$tst.so" 2> "$tst_log"; then
|
|
echo "Test $tst passed."
|
|
echo ":test-result: PASS $tst" >> $test_output
|
|
else
|
|
cat "$tst_log"
|
|
echo "============================================================="
|
|
echo "Test failed on unit: $tst re-run with:"
|
|
echo " $ gdb --args ../loolwsd --systemplate=\"@SYSTEMPLATE_PATH@\" --lotemplate=\"@LO_PATH@\" \\"
|
|
echo " --childroot=\"@JAILS_PATH@\" --unitlib=\".libs/unit-$tst.so\""
|
|
echo "============================================================="
|
|
echo ":test-result: FAIL $tst" >> $test_output
|
|
fi
|
|
done
|
|
|