aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2014-12-18 11:26:04 +1030
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-12-18 18:07:19 +1100
commit9b8614d3b5a3d6bd2b4ea4d53f4864485770db89 (patch)
tree4543e1c517602e72869e1d071e5c08cca0420eff /test
parent0efc59a59c36ba778a834fbc3f4d37f0eb38a086 (diff)
downloadskiboot-9b8614d3b5a3d6bd2b4ea4d53f4864485770db89.zip
skiboot-9b8614d3b5a3d6bd2b4ea4d53f4864485770db89.tar.gz
skiboot-9b8614d3b5a3d6bd2b4ea4d53f4864485770db89.tar.bz2
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 <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/hello_world/run_hello_world.sh7
1 files changed, 6 insertions, 1 deletions
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