|
|
c5da2d |
#!/usr/bin/bash
|
|
|
c5da2d |
# usage: run-tests-wayland [test flavour]
|
|
|
c5da2d |
|
|
|
c5da2d |
set -x
|
|
|
c5da2d |
|
|
|
c5da2d |
RUN_XPCSHELL_TEST=1
|
|
|
c5da2d |
RUN_REFTEST=1
|
|
|
c5da2d |
RUN_MOCHITEST=1
|
|
|
c5da2d |
RUN_CRASHTEST=1
|
|
|
c5da2d |
|
|
|
c5da2d |
while (( "$#" )); do
|
|
|
c5da2d |
SELECTED_TEST=$1
|
|
|
c5da2d |
if [ "$SELECTED_TEST" = "xpcshell" ] ; then
|
|
|
c5da2d |
RUN_XPCSHELL_TEST=1
|
|
|
c5da2d |
elif [ "$SELECTED_TEST" = "reftest" ] ; then
|
|
|
c5da2d |
RUN_REFTEST=1
|
|
|
c5da2d |
elif [ "$SELECTED_TEST" = "mochitest" ] ; then
|
|
|
c5da2d |
RUN_MOCHITEST=1
|
|
|
c5da2d |
elif [ "$SELECTED_TEST" = "crashtest" ] ; then
|
|
|
c5da2d |
RUN_CRASHTEST=1
|
|
|
c5da2d |
fi
|
|
|
c5da2d |
shift
|
|
|
c5da2d |
done
|
|
|
c5da2d |
|
|
|
c5da2d |
export MACH_USE_SYSTEM_PYTHON=1
|
|
|
c5da2d |
export MOZ_NODE_PATH=/usr/bin/node
|
|
|
c5da2d |
|
|
|
c5da2d |
MOCHITEST_PARAMS="--timeout 1 --chunk-by-dir 4"
|
|
|
c5da2d |
TEST_DIR="test_results"
|
|
|
c5da2d |
mkdir $TEST_DIR
|
|
|
c5da2d |
|
|
|
c5da2d |
env | grep "DISPLAY"
|
|
|
c5da2d |
|
|
|
c5da2d |
# Fix for system nss
|
|
|
c5da2d |
ln -s /usr/bin/certutil objdir/dist/bin/certutil
|
|
|
c5da2d |
ln -s /usr/bin/pk12util objdir/dist/bin/pk12util
|
|
|
c5da2d |
|
|
|
c5da2d |
NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
|
|
|
c5da2d |
|
|
|
c5da2d |
export MOZ_ENABLE_WAYLAND=1
|
|
|
c5da2d |
|
|
|
c5da2d |
if [ $RUN_XPCSHELL_TEST -ne 0 ] ; then
|
|
|
c5da2d |
# ./mach xpcshell-test 2>&1 | cat - | tee $TEST_DIR/xpcshell
|
|
|
c5da2d |
./mach xpcshell-test --enable-webrender 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr
|
|
|
c5da2d |
sleep 60
|
|
|
c5da2d |
fi
|
|
|
c5da2d |
|
|
|
c5da2d |
# Basic render testing
|
|
|
c5da2d |
export TEST_PARAMS="--setpref reftest.ignoreWindowSize=true --setpref widget.wayland.test-workarounds.enabled=true"
|
|
|
c5da2d |
#export TEST_FLAVOUR=""
|
|
|
c5da2d |
#if [ $RUN_REFTEST -ne 0 ] ; then
|
|
|
c5da2d |
# ./mach reftest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
|
|
|
c5da2d |
#fi
|
|
|
c5da2d |
#if [ $RUN_CRASHTEST -ne 0 ] ; then
|
|
|
c5da2d |
# ./mach crashtest --marionette localhost:$(($(($RANDOM))+2000)) $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
|
|
|
c5da2d |
#fi
|
|
|
c5da2d |
#if [ $RUN_MOCHITEST -ne 0 ] ; then
|
|
|
c5da2d |
# ./mach mochitest --marionette localhost:$(($(($RANDOM))+2000)) $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
|
|
|
c5da2d |
#fi
|
|
|
c5da2d |
|
|
|
c5da2d |
# WebRender testing
|
|
|
c5da2d |
export TEST_PARAMS="--enable-webrender $TEST_PARAMS"
|
|
|
c5da2d |
export TEST_FLAVOUR="-wr"
|
|
|
c5da2d |
# Use dom/base/test or dom/base/test/chrome for short version
|
|
|
c5da2d |
export MOCHITEST_DIR='dom'
|
|
|
c5da2d |
if [ $RUN_REFTEST -ne 0 ] ; then
|
|
|
c5da2d |
./mach reftest $TEST_PARAMS 2>&1 | tee $TEST_DIR/reftest$TEST_FLAVOUR
|
|
|
c5da2d |
sleep 60
|
|
|
c5da2d |
fi
|
|
|
c5da2d |
if [ $RUN_CRASHTEST -ne 0 ] ; then
|
|
|
c5da2d |
./mach crashtest $TEST_PARAMS 2>&1 | tee $TEST_DIR/crashtest$TEST_FLAVOUR
|
|
|
c5da2d |
sleep 60
|
|
|
c5da2d |
fi
|
|
|
c5da2d |
if [ $RUN_MOCHITEST -ne 0 ] ; then
|
|
|
c5da2d |
./mach mochitest $MOCHITEST_DIR $MOCHITEST_PARAMS $TEST_PARAMS 2>&1 | tee $TEST_DIR/mochitest$TEST_FLAVOUR
|
|
|
c5da2d |
sleep 60
|
|
|
c5da2d |
fi
|
|
|
c5da2d |
|
|
|
c5da2d |
rm -f objdir/dist/bin/certutil
|
|
|
c5da2d |
rm -f objdir/dist/bin/pk12util
|