mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Correctly CD between dirs in ci/acceptance-tests.sh
This correctly CDs back and forth between dirs and tracks things with variables to make it easier on the brain than relative paths like '..' Fixes #9657
This commit is contained in:
parent
fa39243442
commit
bc8db07866
1 changed files with 10 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Since we are using the system jruby, we need to make sure our jvm process
|
||||
# uses at least 1g of memory, If we don't do this we can get OOM issues when
|
||||
|
@ -21,7 +22,7 @@ SELECTED_TEST_SUITE=$1
|
|||
# BUILD_ID unless you set this magic flag: https://wiki.jenkins.io/display/JENKINS/ProcessTreeKiller
|
||||
export BUILD_ID=dontKillMe
|
||||
|
||||
|
||||
LS_HOME="$PWD"
|
||||
QA_DIR="$PWD/qa"
|
||||
|
||||
# Always run the halt, even if the test times out or an exit is sent
|
||||
|
@ -32,13 +33,16 @@ cleanup() {
|
|||
trap cleanup EXIT
|
||||
|
||||
# Cleanup any stale VMs from old jobs first
|
||||
|
||||
cd $QA_DIR
|
||||
bundle exec rake qa:vm:halt
|
||||
|
||||
if [[ $SELECTED_TEST_SUITE == $"redhat" ]]; then
|
||||
echo "Generating the RPM, make sure you start with a clean environment before generating other packages."
|
||||
cd $LS_HOME
|
||||
rake artifact:rpm
|
||||
echo "Acceptance: Installing dependencies"
|
||||
cd qa
|
||||
cd $QA_DIR
|
||||
bundle install
|
||||
|
||||
echo "Acceptance: Running the tests"
|
||||
|
@ -48,9 +52,10 @@ if [[ $SELECTED_TEST_SUITE == $"redhat" ]]; then
|
|||
bundle exec rake qa:vm:halt["redhat"]
|
||||
elif [[ $SELECTED_TEST_SUITE == $"debian" ]]; then
|
||||
echo "Generating the DEB, make sure you start with a clean environment before generating other packages."
|
||||
cd $LS_HOME
|
||||
rake artifact:deb
|
||||
echo "Acceptance: Installing dependencies"
|
||||
cd qa
|
||||
cd $QA_DIR
|
||||
bundle install
|
||||
|
||||
echo "Acceptance: Running the tests"
|
||||
|
@ -60,10 +65,11 @@ elif [[ $SELECTED_TEST_SUITE == $"debian" ]]; then
|
|||
bundle exec rake qa:vm:halt["debian"]
|
||||
elif [[ $SELECTED_TEST_SUITE == $"all" ]]; then
|
||||
echo "Building Logstash artifacts"
|
||||
cd $LS_HOME
|
||||
rake artifact:all
|
||||
|
||||
echo "Acceptance: Installing dependencies"
|
||||
cd qa
|
||||
cd $QA_DIR
|
||||
bundle install
|
||||
|
||||
echo "Acceptance: Running the tests"
|
||||
|
@ -71,7 +77,6 @@ elif [[ $SELECTED_TEST_SUITE == $"all" ]]; then
|
|||
bundle exec rake qa:vm:ssh_config
|
||||
bundle exec rake qa:acceptance:all
|
||||
bundle exec rake qa:vm:halt
|
||||
cd ..
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue