From f787b52b3f5ad270f5bcedd84b91fc686513aaa4 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Thu, 28 May 2015 10:02:37 +1000 Subject: Make boot_test.sh always prefix output with target name This helps when 'make -j' is used for boot tests Signed-off-by: Stewart Smith --- external/boot-tests/boot_test.sh | 16 ++++++++-------- external/boot-tests/fsp_support.sh | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'external') diff --git a/external/boot-tests/boot_test.sh b/external/boot-tests/boot_test.sh index 316a35d..7927b56 100755 --- a/external/boot-tests/boot_test.sh +++ b/external/boot-tests/boot_test.sh @@ -13,13 +13,13 @@ fi # Utility functions function error { unset SSHPASS; - echo "$1" >&2; + echo "$target: $1" >&2; exit 1; } function msg { if [ $V -ne 0 ] ; then - echo $@; + echo "$target: $@"; fi } @@ -90,15 +90,15 @@ function boot_test { function sanity_test { $SSHCMD true; if [ $? -ne 0 ]; then - echo "Failed to SSH to $target..." - echo "Command was: $SSHCMD true" + echo "$target: Failed to SSH to $target..." + echo "$target: Command was: $SSHCMD true" error "Try connecting manually to diagnose the issue." fi $IPMI_COMMAND chassis power status > /dev/null; if [ $? -ne 0 ]; then - echo "Failed to connect to $target with IPMI..." - echo "Command was: $IPMI_COMMAND chassis power status" + echo "$target: Failed to connect to $target with IPMI..." + echo "$target: Command was: $IPMI_COMMAND chassis power status" error "Try connecting manually to diagnose the issue." fi @@ -252,8 +252,8 @@ if ! is_off; then fi # run the boot test -echo "Boot testing $target"; +echo "$target: Boot testing $target"; begin_t=$(date +%s); boot_test -echo "Done in $(expr $(date +%s) - $begin_t ) seconds"; +echo "$target: Done in $(expr $(date +%s) - $begin_t ) seconds"; diff --git a/external/boot-tests/fsp_support.sh b/external/boot-tests/fsp_support.sh index e3ae229..861d218 100644 --- a/external/boot-tests/fsp_support.sh +++ b/external/boot-tests/fsp_support.sh @@ -125,22 +125,22 @@ function boot_firmware { state=$($SSHCMD "$GET_PROFILE; smgr mfgState"); case "$state" in "ipling") - echo "$target still hasn't come up but firmware hasn't specifically crashed"; + echo "$target: still hasn't come up but firmware hasn't specifically crashed"; ;; "dumping") - echo "$target has crashed"; + echo "$target: has crashed"; ;; "runtime") - echo "Oops, looks like system has managed to come up..."; + echo "$target: Oops, looks like system has managed to come up..."; ;; "standby") - echo "System is powered off? How can this be?"; + echo "$target: System is powered off? How can this be?"; ;; *) - echo "$taget is an unknown state '$state'"; + echo "$target: is an unknown state '$state'"; ;; esac - echo "istep log"; + echo "$target: istep log"; cat $ISTEP_LOG; rm -rf $ISTEP_LOG error "Boot test on $target failed"; @@ -151,13 +151,13 @@ function boot_firmware { function machine_sanity_test { $SSHCMD "$GET_PROFILE; test -d /nfs/bin" if [ $? -ne 0 ]; then - echo "Failed to read /nfs/bin" + echo "$target: Failed to read /nfs/bin" error "Is /nfs mounted on the FSP?" fi $SSHCMD "$GET_PROFILE; which md5sum > /dev/null && which cupdmfg > /dev/null" if [ $? -ne 0 ]; then - echo "Missing md5sum or cupdmfg on the FSP?" + echo "$target: Missing md5sum or cupdmfg on the FSP?" error "Is /nfs mounted on the FSP?" fi } -- cgit v1.1