7 ARTIFACT_DIR
=$TASKCLUSTER_ROOT_DIR/builds
/worker
/artifacts
/
8 mkdir
-p "$ARTIFACT_DIR"
10 # There's a bug in snapd ~2.60.3-2.61 that will make "snap refresh" fail
11 # https://bugzilla.mozilla.org/show_bug.cgi?id=1873359
12 # https://bugs.launchpad.net/snapd/+bug/2048104/comments/13
14 # So we retrieve the version and we will allow the first "snap refresh" to
15 # fail for versions < 2.61.1
16 SNAP_VERSION
=$
(snap info snapd
--color=never
--unicode=never |
grep "installed:" |
awk '{ print $2 }')
17 SNAP_MAJOR
=$
(echo "${SNAP_VERSION}" | cut
-d'.' -f1)
18 SNAP_MINOR
=$
(echo "${SNAP_VERSION}" | cut
-d'.' -f2)
19 SNAP_RELEASE
=$
(echo "${SNAP_VERSION}" | cut
-d'.' -f3)
22 if [ "${SNAP_MAJOR}" -ge 2 ]; then
23 if [ "${SNAP_MAJOR}" -gt 2 ]; then
24 REFRESH_CAN_FAIL
=false
26 if [ "${SNAP_MINOR}" -ge 61 ]; then
27 if [ "${SNAP_MINOR}" -gt 61 ]; then
28 REFRESH_CAN_FAIL
=false
30 if [ "${SNAP_RELEASE}" -gt 0 ]; then
31 REFRESH_CAN_FAIL
=false
38 if [ "${REFRESH_CAN_FAIL}" = "true" ]; then
39 sudo snap refresh || true
44 sudo snap refresh
--hold=24h firefox
46 sudo snap
install --name firefox
--dangerous .
/firefox.snap
48 RUNTIME_VERSION
=$
(snap run firefox
--version |
awk '{ print $3 }')
50 python3
-m pip
install --user -r requirements.txt
52 sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/#" < expectations.json.
in > expectations.json
54 python3 basic_tests.py expectations.json
56 cp .
/*.png
"$ARTIFACT_DIR/"