From 19010a5ffa23cb0df84af5ce1eb1a8c73cac7fb3 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 19 Apr 2022 00:55:15 -0600 Subject: [PATCH] fix(installation-tests): keep npm scratch space to debug tests (#13625) This way we can debug test failures between runs. --- installation-tests/initialize_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installation-tests/initialize_test.sh b/installation-tests/initialize_test.sh index 96fb973a24..8d71d0192a 100755 --- a/installation-tests/initialize_test.sh +++ b/installation-tests/initialize_test.sh @@ -67,8 +67,7 @@ function clean_test_root() { } function initialize_test { - TEST_TMP_NPM_SCRATCH_SPACE="$(mktemp -d)"; - trap "report_test_result; kill %1; rm -rf $TEST_TMP_NPM_SCRATCH_SPACE; cd $(pwd -P);" EXIT + trap "report_test_result; kill %1; cd $(pwd -P);" EXIT cd "$(dirname $0)" # cleanup environment @@ -120,6 +119,7 @@ function initialize_test { # Start up our local registry and configure npm to use it local-playwright-registry start & + TEST_TMP_NPM_SCRATCH_SPACE="${TEST_FRAMEWORK_RUN_ROOT}/${TEST_NAME}--npm-scratch-space" export npm_config_prefix="$TEST_TMP_NPM_SCRATCH_SPACE/npm_prefix" export npm_config_cache="$TEST_TMP_NPM_SCRATCH_SPACE/npm_cache" export npm_config_registry="$(local-playwright-registry wait-for-ready)"