From 9ec970432068b9e56b93be1490ac169da963cdea Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Mon, 17 Nov 2025 10:51:34 +0100 Subject: [PATCH] Revert "test-on-testmachine: use $BASEDIR from functions" This reverts commit 17e04d90b3b461b1a859282dc5ed1eea927ed991. --- build-scripts/test-on-testmachine | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build-scripts/test-on-testmachine b/build-scripts/test-on-testmachine index 8dff455b6..172fef7ce 100755 --- a/build-scripts/test-on-testmachine +++ b/build-scripts/test-on-testmachine @@ -23,10 +23,17 @@ chroot) ;; esac +SCRIPT_BASEDIR="$( + cd "$(dirname "$0")" + pwd +)" # /home/user/whatever/buildscripts/build-scripts +SCRIPT_BASEDIR="$(dirname "$SCRIPT_BASEDIR")" # /home/user/whatever/buildscripts +SCRIPT_BASEDIR="$(dirname "$SCRIPT_BASEDIR")" # /home/user/whatever + # We still need to perform several cleanup tasks after doing a chroot test run. # So wrap the test execution in an if so that we can proceed with clean-up on error. log_debug "Executing tests on test machine..." -if remote_script_general "$SCRIPT" "$LOGIN_COMMAND" "$BASEDIR"; then +if remote_script_general "$SCRIPT" "$LOGIN_COMMAND" "$SCRIPT_BASEDIR"; then return_code=0 else return_code=$?