summaryrefslogtreecommitdiff
path: root/run-tests
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2020-12-01 11:17:26 +0100
committerMartin Stransky <stransky@redhat.com>2020-12-01 11:17:26 +0100
commit42bfda048579824669346237aed1f0cb7e78fad5 (patch)
tree6515ada8243dbe04919527545d67b6a24bee2c38 /run-tests
parentUpdated test printing (diff)
downloadlibrewolf-fedora-ff-42bfda048579824669346237aed1f0cb7e78fad5.tar.gz
librewolf-fedora-ff-42bfda048579824669346237aed1f0cb7e78fad5.tar.bz2
librewolf-fedora-ff-42bfda048579824669346237aed1f0cb7e78fad5.zip
Test fixes
Diffstat (limited to 'run-tests')
-rwxr-xr-xrun-tests45
1 files changed, 45 insertions, 0 deletions
diff --git a/run-tests b/run-tests
new file mode 100755
index 0000000..b4a6bf7
--- /dev/null
+++ b/run-tests
@@ -0,0 +1,45 @@
+#!/usr/bin/bash
+set -x
+
+export MACH_USE_SYSTEM_PYTHON=1
+export MOZ_NODE_PATH=/usr/bin/node
+export X_PARAMS="-screen 0 1600x1200x24"
+export MOCHITEST_PARAMS="--timeout 10 --chunk-by-dir 4"
+export TEST_DIR="test_results"
+
+# 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`"
+
+# Basic render testing
+export TEST_PARAMS=""
+export TEST_FLAVOUR=""
+xvfb-run -s "$X_PARAMS" ./mach mochitest $MOCHITEST_PARAMS $TEST_PARAMS >& $TEST_DIR/mochitest$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach jstestbrowser $TEST_PARAMS >& $TEST_DIR/jstestbrowser$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach crashtest $TEST_PARAMS --run-tests-in-parallel >& $TEST_DIR/crashtest$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach marionette-test $TEST_PARAMS >& $TEST_DIR/marionette$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach reftest $TEST_PARAMS --run-tests-in-parallel >& $TEST_DIR/reftest$TEST_FLAVOUR
+./mach xpcshell-test $TEST_PARAMS 2>&1 | cat - > $TEST_DIR/xpcshell$TEST_FLAVOUR
+./mach gtest -j $NCPUS $TEST_PARAMS >& $TEST_DIR/gtest$TEST_FLAVOUR
+
+# WebRender testing
+export TEST_PARAMS="--enable-webrender $TEST_PARAMS"
+export TEST_FLAVOUR="-wr"
+xvfb-run -s "$X_PARAMS" ./mach mochitest $MOCHITEST_PARAMS $TEST_PARAMS >& $TEST_DIR/mochitest$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach jstestbrowser $TEST_PARAMS >& $TEST_DIR/jstestbrowser$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach crashtest $TEST_PARAMS --run-tests-in-parallel >& $TEST_DIR/crashtest$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach marionette-test $TEST_PARAMS >& $TEST_DIR/marionette$TEST_FLAVOUR
+xvfb-run -s "$X_PARAMS" ./mach reftest $TEST_PARAMS --run-tests-in-parallel >& $TEST_DIR/reftest$TEST_FLAVOUR
+./mach xpcshell-test $TEST_PARAMS 2>&1 | cat - > $TEST_DIR/xpcshell$TEST_FLAVOUR
+./mach gtest -j $NCPUS $TEST_PARAMS >& $TEST_DIR/gtest$TEST_FLAVOUR
+
+# Rest
+export TEST_DIR="test"
+objdir/dist/bin/jsapi-tests >& $TEST_DIR/jsapi
+./mach cppunittest >& $TEST_DIR/cppunittest
+./mach jstests >& $TEST_DIR/jstests
+
+rm -f objdir/dist/bin/certutil
+rm -f objdir/dist/bin/pk12util
bgstack15