From 9b8614d3b5a3d6bd2b4ea4d53f4864485770db89 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Thu, 18 Dec 2014 11:26:04 +1030 Subject: test/hello_world: Fix some corner cases in test script The test for expect would always return true. This change makes it do the correct thing in the presence and absence of expect on my Ubuntu machine. Also, skip the test if the user has KERNEL set. With this set skiboot contains an embedded kernel, and will load that before falling back to our hello_world test kernel, causing all kinds of confusion. Signed-off-by: Joel Stanley Signed-off-by: Stewart Smith --- test/hello_world/run_hello_world.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/hello_world/run_hello_world.sh b/test/hello_world/run_hello_world.sh index dcb79a8..f72c402 100755 --- a/test/hello_world/run_hello_world.sh +++ b/test/hello_world/run_hello_world.sh @@ -14,7 +14,12 @@ if [ ! -x "$MAMBO_PATH/$MAMBO_BINARY" ]; then exit 0; fi -if [ ! -x `which expect` ]; then +if [ -n "$KERNEL" ]; then + echo 'Please rebuild skiboot without KERNEL set. Skipping hello_world test'; + exit 0; +fi + +if [ ! `command -v expect` ]; then echo 'Could not find expect binary. Skipping hello_world test'; exit 0; fi -- cgit v1.1