2020-12-10 20:59:50 +00:00
|
|
|
#!/usr/bin/bash
|
2021-04-04 16:51:01 +00:00
|
|
|
# usage: run-tests-wayland [test flavour]
|
2020-12-22 06:24:42 +00:00
|
|
|
|
2020-12-10 20:59:50 +00:00
|
|
|
set -x
|
|
|
|
|
2021-04-07 20:06:27 +00:00
|
|
|
RUN_XPCSHELL_TEST=0
|
2021-04-04 16:51:01 +00:00
|
|
|
RUN_REFTEST=1
|
2021-04-22 13:55:40 +00:00
|
|
|
RUN_MOCHITEST=1
|
2021-04-06 07:58:31 +00:00
|
|
|
RUN_CRASHTEST=1
|
2020-12-22 06:24:42 +00:00
|
|
|
|
2021-04-04 16:51:01 +00:00
|
|
|
while (( "$#" )); do
|
|
|
|
SELECTED_TEST=$1
|
|
|
|
if [ "$SELECTED_TEST" = "xpcshell" ] ; then
|
|
|
|
RUN_XPCSHELL_TEST=1
|
|
|
|
elif [ "$SELECTED_TEST" = "reftest" ] ; then
|
|
|
|
RUN_REFTEST=1
|
|
|
|
elif [ "$SELECTED_TEST" = "mochitest" ] ; then
|
|
|
|
RUN_MOCHITEST=1
|
|
|
|
elif [ "$SELECTED_TEST" = "crashtest" ] ; then
|
|
|
|
RUN_CRASHTEST=1
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
done
|
2020-12-22 06:24:42 +00:00
|
|
|
|
2020-12-14 14:12:55 +00:00
|
|
|
MACH_USE_SYSTEM_PYTHON=1
|
|
|
|
MOZ_NODE_PATH=/usr/bin/node
|
|
|
|
MOCHITEST_PARAMS="--timeout 1 --chunk-by-dir 4"
|
|
|
|
TEST_DIR="test_results"
|
2020-12-22 06:24:42 +00:00
|
|
|
mkdir $TEST_DIR
|
2020-12-10 20:59:50 +00:00
|
|
|
|
|
|
|
# Fix for system nss
|
|
|
|
ln -s /usr/bin/certutil objdir/dist/bin/certutil
|
|
|
|
ln -s /usr/bin/pk12util objdir/dist/bin/pk12util
|
|
|
|
|
|
|
|
NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
|
|
|
|
|
2020-12-14 14:12:55 +00:00
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
|
|
|
|
2020-12-22 06:24:42 +00:00
|
|
|
if [ $RUN_XPCSHELL_TEST -ne 0 ] ; then
|
2021-04-22 13:55:40 +00:00
|
|
|
# ./mach xpcshell-test 2>&1 | cat - | tee $TEST_DIR/xpcshell
|
2021-01-11 10:14:03 +00:00
|
|
|
./mach xpcshell-test --enable-webrender 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr
|
2021-04-22 13:55:40 +00:00
|
|
|
sleep 60
|
2020-12-22 06:24:42 +00:00
|
|
|
fi
|
2020-12-14 14:12:55 +00:00
|
|
|
|
2020-12-10 20:59:50 +00:00
|
|
|
# Basic render testing
|
2021-04-07 20:06:27 +00:00
|
|
|
export TEST_PARAMS="--setpref reftest.ignoreWindowSize=true --setpref widget.wayland-focus-workaroud=true"
|
2021-04-22 13:55:40 +00:00
|
|
|
#export TEST_FLAVOUR=""
|
|
|
|
#if [ $RUN_REFTEST -ne 0 ] ; then
|
|
|
|
# ./mach reftest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
|
|
|
|
#fi
|
|
|
|
#if [ $RUN_CRASHTEST -ne 0 ] ; then
|
|
|
|
# ./mach crashtest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
|
|
|
|
#fi
|
|
|
|
#if [ $RUN_MOCHITEST -ne 0 ] ; then
|
|
|
|
# ./mach mochitest --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
|
|
|
|
#fi
|
2020-12-10 20:59:50 +00:00
|
|
|
|
|
|
|
# WebRender testing
|
|
|
|
export TEST_PARAMS="--enable-webrender $TEST_PARAMS"
|
|
|
|
export TEST_FLAVOUR="-wr"
|
2020-12-22 06:24:42 +00:00
|
|
|
if [ $RUN_REFTEST -ne 0 ] ; then
|
2021-04-22 13:55:40 +00:00
|
|
|
./mach reftest $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
|
|
|
|
sleep 60
|
2020-12-22 06:24:42 +00:00
|
|
|
fi
|
|
|
|
if [ $RUN_CRASHTEST -ne 0 ] ; then
|
2021-04-22 13:55:40 +00:00
|
|
|
./mach crashtest $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
|
|
|
|
sleep 60
|
2020-12-22 06:24:42 +00:00
|
|
|
fi
|
|
|
|
if [ $RUN_MOCHITEST -ne 0 ] ; then
|
2021-04-22 13:55:40 +00:00
|
|
|
./mach mochitest dom $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
|
|
|
|
sleep 60
|
2020-12-22 06:24:42 +00:00
|
|
|
fi
|
2020-12-10 20:59:50 +00:00
|
|
|
|
|
|
|
rm -f objdir/dist/bin/certutil
|
|
|
|
rm -f objdir/dist/bin/pk12util
|