Skip to content

Commit 4b48532

Browse files
committed
playwright: fix tmt in dist-git
Recently testing-farm tests were failing and a fix was merged in 3507013e where TMT_TREE is used instead of TMT_SOURCE. This got the CI working, but broke the tests when running in dist-git. We need to use TMT_SOURCE when in CI, and TMT_SOURCE_DIR when in dist-git. This commit adds the dist-git case back while keeping TMT_SOURCE for Packit.
1 parent 4e26bdb commit 4b48532

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

schutzbot/playwright_tests.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
set -euo pipefail
33

44
PW_WORKERS=4
5-
if [ -n "${TMT_TREE:-}" ]; then
6-
# Move to the directory with sources
5+
if [ -n "${TMT_SOURCE_DIR:-}" ]; then
6+
# Runs in dist-git
7+
cd "${TMT_SOURCE_DIR}/cockpit-image-builder"
8+
npm ci
9+
elif [ -n "${TMT_TREE:-}" ]; then
10+
# Runs in CI (Packit)
711
cd "${TMT_TREE}"
812
npm ci
913
elif [ "${CI:-}" != "true" ]; then
14+
# Local fallback
1015
cd ../
1116
npm ci
1217
# halve the workers on schutzbot to increase reliability

0 commit comments

Comments
 (0)