diff --git a/scripts/long-running-test.sh b/scripts/long-running-test.sh index f051319fead..39efc741ba0 100755 --- a/scripts/long-running-test.sh +++ b/scripts/long-running-test.sh @@ -3,6 +3,7 @@ set -eo pipefail # variables echo "--- $([[ "$BUILDKITE" == 'true' ]] && echo ':evergreen_tree: ')Configuring Environment" GIT_ROOT="$(dirname $BASH_SOURCE[0])/.." +RABBITMQ_SERVER_DETACHED='rabbitmq-server -detached' [[ -z "$TEST" ]] && export TEST="$1" if [[ "$(uname)" == 'Linux' ]]; then . /etc/os-release @@ -13,6 +14,9 @@ fi cd "$GIT_ROOT/build" # tests if [[ -z "$TEST" ]]; then # run all serial tests + echo "$ $RABBITMQ_SERVER_DETACHED" + eval $RABBITMQ_SERVER_DETACHED + sleep 10 # count tests echo "+++ $([[ "$BUILDKITE" == 'true' ]] && echo ':microscope: ')Running Long-Running Tests" TEST_COUNT=$(ctest -N -L 'long_running_tests' | grep -i 'Total Tests: ' | cut -d ':' -f '2' | awk '{print $1}') @@ -30,6 +34,11 @@ if [[ -z "$TEST" ]]; then # run all serial tests EXIT_STATUS='1' fi else # run specific serial test + if [[ "$(echo "$TEST" | grep -ci 'rabbit')" != '0' ]]; then + echo "$ $RABBITMQ_SERVER_DETACHED" + eval $RABBITMQ_SERVER_DETACHED + sleep 10 + fi # ensure test exists echo "+++ $([[ "$BUILDKITE" == 'true' ]] && echo ':microscope: ')Running $TEST" TEST_COUNT=$(ctest -N -R "^$TEST$" | grep -i 'Total Tests: ' | cut -d ':' -f '2' | awk '{print $1}')