From aed63c86cac71b61d409a4ac32786ec57ca8311d Mon Sep 17 00:00:00 2001 From: immanuwell Date: Tue, 26 May 2026 08:54:05 +0400 Subject: [PATCH] fix: resolve relative paths in smoke test scripts --- debian_component_based/test-components.sh | 5 +++-- debian_component_based/test-dcb-emulators.sh | 9 +++++---- emulators/test-all-emulators.sh | 13 +++++++------ test-all-emulators-latest.sh | 13 +++++++------ test-latest.sh | 5 +++-- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/debian_component_based/test-components.sh b/debian_component_based/test-components.sh index 26975bc6..8cd946b0 100755 --- a/debian_component_based/test-components.sh +++ b/debian_component_based/test-components.sh @@ -1,5 +1,7 @@ #!/bin/bash +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" + echo "Checking gsutil version" gsutil version @@ -28,5 +30,4 @@ echo "Checking kubectl version" kubectl version echo "Checking the emulators" -./test-all-emulators.sh - +"$SCRIPT_DIR/test-dcb-emulators.sh" diff --git a/debian_component_based/test-dcb-emulators.sh b/debian_component_based/test-dcb-emulators.sh index 543a5463..4f9350e9 100755 --- a/debian_component_based/test-dcb-emulators.sh +++ b/debian_component_based/test-dcb-emulators.sh @@ -1,7 +1,9 @@ #!/bin/bash -./emulator-testing.sh pubsub +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" + +"$SCRIPT_DIR/emulator-testing.sh" pubsub if [ $? -ne 0 ]; then echo "Pub/sub emulator failed to execute." @@ -9,7 +11,7 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh datastore +"$SCRIPT_DIR/emulator-testing.sh" datastore if [ $? -ne 0 ]; then echo "Datastore emulator failed to execute." @@ -17,11 +19,10 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh bigtable +"$SCRIPT_DIR/emulator-testing.sh" bigtable if [ $? -ne 0 ]; then echo "Bigtable emulator failed to execute." exit 1 fi - diff --git a/emulators/test-all-emulators.sh b/emulators/test-all-emulators.sh index 24261044..c3482a21 100755 --- a/emulators/test-all-emulators.sh +++ b/emulators/test-all-emulators.sh @@ -1,7 +1,9 @@ #!/bin/bash -./emulator-testing.sh pubsub +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" + +"$SCRIPT_DIR/emulator-testing.sh" pubsub if [ $? -ne 0 ]; then echo "Pub/sub emulator failed to execute." @@ -9,7 +11,7 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh datastore +"$SCRIPT_DIR/emulator-testing.sh" datastore if [ $? -ne 0 ]; then echo "Datastore emulator failed to execute." @@ -17,7 +19,7 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh firestore +"$SCRIPT_DIR/emulator-testing.sh" firestore if [ $? -ne 0 ]; then echo "Firestore emulator failed to execute." @@ -25,7 +27,7 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh spanner +"$SCRIPT_DIR/emulator-testing.sh" spanner if [ $? -ne 0 ]; then echo "Spanner emulator failed to execute." @@ -33,11 +35,10 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh bigtable +"$SCRIPT_DIR/emulator-testing.sh" bigtable if [ $? -ne 0 ]; then echo "Bigtable emulator failed to execute." exit 1 fi - diff --git a/test-all-emulators-latest.sh b/test-all-emulators-latest.sh index 78b79fbe..e009dac7 100755 --- a/test-all-emulators-latest.sh +++ b/test-all-emulators-latest.sh @@ -1,6 +1,8 @@ #!/bin/bash -./emulator-testing.sh pubsub +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" + +"$SCRIPT_DIR/emulators/emulator-testing.sh" pubsub if [ $? -ne 0 ]; then echo "Pub/sub emulator failed to execute." @@ -10,7 +12,7 @@ fi # TODO: datastore & firestore emulators are not supported on debian 12 because of Java 21 dependency -# ./emulator-testing.sh datastore +# "$SCRIPT_DIR/emulators/emulator-testing.sh" datastore # if [ $? -ne 0 ]; then # echo "Datastore emulator failed to execute." @@ -18,7 +20,7 @@ fi # fi -# ./emulator-testing.sh firestore +# "$SCRIPT_DIR/emulators/emulator-testing.sh" firestore # if [ $? -ne 0 ]; then # echo "Firestore emulator failed to execute." @@ -26,7 +28,7 @@ fi # fi -./emulator-testing.sh spanner +"$SCRIPT_DIR/emulators/emulator-testing.sh" spanner if [ $? -ne 0 ]; then echo "Spanner emulator failed to execute." @@ -34,11 +36,10 @@ if [ $? -ne 0 ]; then fi -./emulator-testing.sh bigtable +"$SCRIPT_DIR/emulators/emulator-testing.sh" bigtable if [ $? -ne 0 ]; then echo "Bigtable emulator failed to execute." exit 1 fi - diff --git a/test-latest.sh b/test-latest.sh index 26975bc6..31ee82fb 100755 --- a/test-latest.sh +++ b/test-latest.sh @@ -1,5 +1,7 @@ #!/bin/bash +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" + echo "Checking gsutil version" gsutil version @@ -28,5 +30,4 @@ echo "Checking kubectl version" kubectl version echo "Checking the emulators" -./test-all-emulators.sh - +"$SCRIPT_DIR/test-all-emulators-latest.sh"