Skip to content

Commit

Permalink
tests: run vagrant_up.sh from dirname
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
  • Loading branch information
guits committed Feb 16, 2024
1 parent b82a6ed commit 91f2ae8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/scripts/vagrant_up.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
#!/bin/bash
set -x
echo "BEFORE: $@"
if [[ -n $1 ]]; then
DIRECTORY=$1
shift
else
DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
fi
pushd "${DIRECTORY}"

echo "AFTER: $@"

if [[ -n $1 ]]; then
DIRECTORY=$1
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}"
Expand All @@ -17,3 +35,4 @@ do
done

sleep 10
popd

0 comments on commit 91f2ae8

Please sign in to comment.