summaryrefslogtreecommitdiffstats
path: root/taskcluster/docker/snap-coreXX-build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /taskcluster/docker/snap-coreXX-build
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/docker/snap-coreXX-build')
-rw-r--r--taskcluster/docker/snap-coreXX-build/snap-tests/README.md4
-rw-r--r--taskcluster/docker/snap-coreXX-build/snap-tests/record.py24
-rwxr-xr-xtaskcluster/docker/snap-coreXX-build/snap-tests/tests.sh10
3 files changed, 38 insertions, 0 deletions
diff --git a/taskcluster/docker/snap-coreXX-build/snap-tests/README.md b/taskcluster/docker/snap-coreXX-build/snap-tests/README.md
index 73f78c72bc..bdc79dbe4b 100644
--- a/taskcluster/docker/snap-coreXX-build/snap-tests/README.md
+++ b/taskcluster/docker/snap-coreXX-build/snap-tests/README.md
@@ -16,6 +16,10 @@ inspecting the browser at the end of a test.
Data URL containing the diff screenshot will be dumped to stdout/stderr when
`TEST_DUMP_DIFF` is set in the environment.
+A recording of the desktop can be captured via GNOME Screencast feature by
+passing `TEST_RECORD_SCREEN=true` in the enviromnent. Upon completion of the
+task it should upload a WebM file.
+
Updating reference screenshots
==============================
- `./mach try fuzzy --push-to-lando --full --env TEST_COLLECT_REFERENCE=1 -q "'snap-upstream-test"`
diff --git a/taskcluster/docker/snap-coreXX-build/snap-tests/record.py b/taskcluster/docker/snap-coreXX-build/snap-tests/record.py
new file mode 100644
index 0000000000..51fe47f6d8
--- /dev/null
+++ b/taskcluster/docker/snap-coreXX-build/snap-tests/record.py
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+import os
+import time
+
+import dbus
+
+session_bus = dbus.SessionBus()
+session_bus.call_blocking(
+ "org.gnome.Shell.Screencast",
+ "/org/gnome/Shell/Screencast",
+ "org.gnome.Shell.Screencast",
+ "Screencast",
+ signature="sa{sv}",
+ args=[
+ os.path.join(os.environ.get("ARTIFACT_DIR", ""), "video_%d_%t.webm"),
+ {"draw-cursor": True, "framerate": 35},
+ ],
+)
+
+while True:
+ time.sleep(30)
diff --git a/taskcluster/docker/snap-coreXX-build/snap-tests/tests.sh b/taskcluster/docker/snap-coreXX-build/snap-tests/tests.sh
index 854ef2c9af..3412d04727 100755
--- a/taskcluster/docker/snap-coreXX-build/snap-tests/tests.sh
+++ b/taskcluster/docker/snap-coreXX-build/snap-tests/tests.sh
@@ -60,6 +60,16 @@ if [ -n "${MOZ_LOG}" ]; then
export MOZ_LOG_FILE="${ARTIFACT_DIR}/gecko-log"
fi
+RECORD_SCREEN_PID=0
+if [ "${TEST_RECORD_SCREEN}" = "true" ]; then
+ python3 record.py &
+ RECORD_SCREEN_PID=$!
+ echo "Recording with PID ${RECORD_SCREEN_PID}"
+
+ trap 'echo [EXIT] Stopping screen recording from PID ${RECORD_SCREEN_PID} && kill ${RECORD_SCREEN_PID}' EXIT
+ trap 'echo [ERR] Stopping screen recording from PID ${RECORD_SCREEN_PID} && kill ${RECORD_SCREEN_PID}' ERR
+fi;
+
if [ "${SUITE}" = "basic" ]; then
sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/#" < basic_tests/expectations.json.in > basic_tests/expectations.json
python3 basic_tests.py basic_tests/expectations.json