Skip to content

Commit

Permalink
test/hello_world: use P9MAMBO_ to differentiate from P8
Browse files Browse the repository at this point in the history
Helps if you're building mambo from source (or haven't used the
packages in exactly the way they install) to ensure you run both
the p8 and p9 mambo simulators for testing.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Feb 22, 2017
1 parent 98e81fe commit a5274aa
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/hello_world/run_mambo_p9_hello_world.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/bash


if [ -z "$MAMBO_PATH" ]; then
MAMBO_PATH=/opt/ibm/systemsim-p9/
if [ -z "$P9MAMBO_PATH" ]; then
P9MAMBO_PATH=/opt/ibm/systemsim-p9/
fi

if [ -z "$MAMBO_BINARY" ]; then
MAMBO_BINARY="/run/p9/power9"
if [ -z "$P9MAMBO_BINARY" ]; then
P9MAMBO_BINARY="/run/p9/power9"
fi

if [ ! -x "$MAMBO_PATH/$MAMBO_BINARY" ]; then
echo "Could not find executable MAMBO_BINARY ($MAMBO_PATH/$MAMBO_BINARY). Skipping hello_world test";
if [ ! -x "$P9MAMBO_PATH/$P9MAMBO_BINARY" ]; then
echo "Could not find executable P9MAMBO_BINARY ($P9MAMBO_PATH/$MAMBO_BINARY). Skipping hello_world test";
exit 0;
fi

Expand Down Expand Up @@ -38,7 +37,7 @@ trap "rm -f -- '$t'" EXIT
( cd external/mambo;
cat <<EOF | expect
set timeout 30
spawn $MAMBO_PATH/$MAMBO_BINARY -n -f ../../test/hello_world/run_hello_world.tcl
spawn $P9MAMBO_PATH/$P9MAMBO_BINARY -n -f ../../test/hello_world/run_hello_world.tcl
expect {
timeout { send_user "\nTimeout waiting for hello world\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
Expand Down

0 comments on commit a5274aa

Please sign in to comment.