summaryrefslogtreecommitdiff
path: root/run-tests-wayland
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2021-04-04 18:51:01 +0200
committerMartin Stransky <stransky@redhat.com>2021-04-04 18:51:01 +0200
commit9869746357fecb892b80986ac923c137b1e6c94d (patch)
tree93bf582811e0bfa2d3fbf513ee644091aea8e194 /run-tests-wayland
parentAdded fix for mozbz#1702606 / rhbz#1936071, Switched tests back to X11 due to... (diff)
downloadlibrewolf-fedora-ff-9869746357fecb892b80986ac923c137b1e6c94d.tar.gz
librewolf-fedora-ff-9869746357fecb892b80986ac923c137b1e6c94d.tar.bz2
librewolf-fedora-ff-9869746357fecb892b80986ac923c137b1e6c94d.zip
Fixed wayland tests/PGO, enable PGO on Fedora 33+
Diffstat (limited to 'run-tests-wayland')
-rwxr-xr-xrun-tests-wayland63
1 files changed, 15 insertions, 48 deletions
diff --git a/run-tests-wayland b/run-tests-wayland
index 16e47ed..eb5d639 100755
--- a/run-tests-wayland
+++ b/run-tests-wayland
@@ -1,38 +1,26 @@
#!/usr/bin/bash
-# usage: run-tests-wayland offscreen [test flavour]
-if ! [ $1 ] ; then
- echo "Missing test params!"
- echo ""
- echo "usage: run-tests-wayland offscreen [test_flavour]"
- echo ""
- echo " offscreen can be 0 or 1"
- echo " test_flavour can be xpc ref moch crash"
- exit
-fi
+# usage: run-tests-wayland [test flavour]
set -x
-OFFSCREEN_TESTING=$1
RUN_XPCSHELL_TEST=0
-RUN_REFTEST=0
+RUN_REFTEST=1
RUN_MOCHITEST=0
RUN_CRASHTEST=0
-SELECTED_TEST=$2
-if [ "$SELECTED_TEST" = "xpc" ] ; then
- RUN_XPCSHELL_TEST=1
-elif [ "$SELECTED_TEST" = "ref" ] ; then
- RUN_REFTEST=1
-elif [ "$SELECTED_TEST" = "moch" ] ; then
- RUN_MOCHITEST=1
-elif [ "$SELECTED_TEST" = "crash" ] ; then
- RUN_CRASHTEST=1
-else
- RUN_XPCSHELL_TEST=1
- RUN_REFTEST=1
- RUN_MOCHITEST=0
- RUN_CRASHTEST=1
-fi
+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
MACH_USE_SYSTEM_PYTHON=1
MOZ_NODE_PATH=/usr/bin/node
@@ -48,27 +36,6 @@ NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
export MOZ_ENABLE_WAYLAND=1
-if [ $OFFSCREEN_TESTING -ne 0 ] ; then
- xvfb-run -s "-screen 0 1600x1200x24" -n 80 mutter --wayland --nested &
- if [ -z "$WAYLAND_DISPLAY" ] ; then
- export WAYLAND_DISPLAY=wayland-0
- else
- export WAYLAND_DISPLAY=wayland-1
- fi
- sleep 10
- retry_count=0
- max_retries=5
- until [ $retry_count -gt $max_retries ]; do
- if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then
- retry_count=$(($max_retries + 1))
- else
- retry_count=$(($retry_count + 1))
- echo "Waiting for Mutter, retry: $retry_count"
- sleep 2
- fi
- done
-fi
-
if [ $RUN_XPCSHELL_TEST -ne 0 ] ; then
./mach xpcshell-test 2>&1 | cat - | tee $TEST_DIR/xpcshell
./mach xpcshell-test --enable-webrender 2>&1 | cat - | tee $TEST_DIR/xpcshell-wr
bgstack15