[Skiboot] [PATCH] boot-tests: allow running boot_test.sh via a symlink

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed Apr 13 16:07:23 AEST 2016

In boot_test.sh, use readlink when working out the path to source
{fsp,bmc}_support.sh, so the script doesn't fail when run using a symlink
from outside the boot-tests directory.

Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>


Briefly tested, seems to work. readlink is in coreutils and busybox.
 external/boot-tests/boot_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/external/boot-tests/boot_test.sh b/external/boot-tests/boot_test.sh
index 58e2282..40fc954 100755
--- a/external/boot-tests/boot_test.sh
+++ b/external/boot-tests/boot_test.sh
@@ -243,7 +243,7 @@ fi
 # pull in the relevant config file and set things up
-source $(dirname $0)/${method}_support.sh
+source $(dirname $(readlink -f $0))/${method}_support.sh
 IPMI_COMMAND="ipmitool -I lanplus -H $target $IPMI_AUTH"
 msg "Running sanity test"
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited

More information about the Skiboot mailing list