From 1a17a944728cf2410b378dea4fea00feba73c836 Mon Sep 17 00:00:00 2001 From: Megan Guiney Date: Tue, 3 Jul 2018 21:35:03 -0700 Subject: [PATCH] Add line in mysql setup to ensure that sbin is in path mysqld is installed to sbin by default, so if sbin is not in your path, the tests will fail to set up properly. Change-Id: I8ca72822ccf19046d1f5634245e972f184f5675a --- setup-mysql-tests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup-mysql-tests.sh b/setup-mysql-tests.sh index c1ac1326..190ed90e 100755 --- a/setup-mysql-tests.sh +++ b/setup-mysql-tests.sh @@ -9,12 +9,22 @@ wait_for_line () { cat "$2" >/dev/null & } +# insert sbin into path if it exists and isnt already there +echo $PATH | grep -q "/usr/sbin" + +if [ $? -ne 0 ] && [ -d "/usr/sbin" ]; then + echo "SBIN NOT IN PATH" + export PATH="$PATH:/usr/sbin" + echo "$PATH" +fi + # If test DB url is provided, run tests with it if [[ "$REFSTACK_TEST_MYSQL_URL" ]] then $* exit $? fi + # Else setup mysql base for tests. # Start MySQL process for tests MYSQL_DATA=`mktemp -d /tmp/refstack-mysql-XXXXX`