From b92235e1a4393f058a404bd4b296ccd030efc4c1 Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Thu, 5 Mar 2020 11:27:27 -0500 Subject: [PATCH] kfdtest: Fix problems finding kfdtest.exclude When running run_kfdtest.sh through a wrapper script that sources run_kfdtest.sh, kfdtest.exclude isn't found because $0 points to the location of the wrapper script. User $BASH_SOURCE instead of $0 to find the location of the correct run_kfdtest.sh script. Change-Id: I0ae7899e527e6d98bb8651197484e5ee03a5fd7b Signed-off-by: Felix Kuehling [ROCm/ROCR-Runtime commit: 8ee763d94a74a5abdd7db4fad8b28076a77d9534] --- projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh b/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh index de4c6783ec..12ef8af51d 100755 --- a/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh +++ b/projects/rocr-runtime/tests/kfdtest/scripts/run_kfdtest.sh @@ -23,7 +23,7 @@ # # See if we can find the SHARE/BIN dirs in their expected locations -CWD="${0%/*}" +CWD="${BASH_SOURCE%/*}" while read candidate; do if [ -e "$candidate/kfdtest.exclude" ]; then source "$candidate/kfdtest.exclude"