]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: run vagrant_up.sh from dirname
authorGuillaume Abrioux <gabrioux@ibm.com>
Fri, 16 Feb 2024 21:59:09 +0000 (22:59 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Fri, 16 Feb 2024 23:13:42 +0000 (00:13 +0100)
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
tests/scripts/vagrant_up.sh

index 6e101dee80626384cee7380164f969d47b3c4059..05b17582f49b3b402be33502bd1511e70424356b 100644 (file)
@@ -1,4 +1,12 @@
 #!/bin/bash
+set -x
+if [[ -n $1 ]]; then
+  DIRECTORY=$1
+  shift
+else
+  DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+fi
+pushd "${DIRECTORY}"
 
 if [[ "${CEPH_ANSIBLE_VAGRANT_BOX}" =~ "centos/stream" ]]; then
   EL_VERSION="${CEPH_ANSIBLE_VAGRANT_BOX: -1}"
@@ -17,3 +25,4 @@ do
 done
 
 sleep 10
+popd