From e00fe603c33d65c228da4fb9bac5234b2ea74cbd Mon Sep 17 00:00:00 2001 From: Lucas Garfield Date: Wed, 3 Jun 2026 09:11:31 -0500 Subject: [PATCH] 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_DIR. This got the CI working, but broke the tests when running in dist-git. We need to use TMT_TREE when in CI, and TMT_SOURCE_DIR when in dist-git. This commit adds the dist-git case back while keeping TMT_TREE for Packit. --- schutzbot/playwright_tests.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/schutzbot/playwright_tests.sh b/schutzbot/playwright_tests.sh index 5542baf56e..a1481f3e8c 100755 --- a/schutzbot/playwright_tests.sh +++ b/schutzbot/playwright_tests.sh @@ -2,11 +2,17 @@ set -euo pipefail PW_WORKERS=4 -if [ -n "${TMT_TREE:-}" ]; then - # Move to the directory with sources + +if [ -n "${PACKIT_PACKAGE_NAME:-}" ]; then + # Runs in CI (Packit) cd "${TMT_TREE}" npm ci +elif [ -n "${TMT_SOURCE_DIR:-}" ]; then + # Runs in dist-git + cd "${TMT_SOURCE_DIR}/cockpit-image-builder" + npm ci elif [ "${CI:-}" != "true" ]; then + # Local fallback cd ../ npm ci # halve the workers on schutzbot to increase reliability