Skip to content
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,19 @@ tasks.register("runIntegrationTests") {
shouldRunAfter ":logstash-core:test"
}

tasks.register("installAcceptanceTestGems", Exec) {
dependsOn bootstrap
inputs.files file("${projectDir}/qa/Gemfile")
outputs.file("${projectDir}/qa/Gemfile.lock")
workingDir "${projectDir}/qa"
commandLine "${projectDir}/vendor/jruby/bin/jruby", "-S", "bundle", "install", "--path", "vendor/bundle"
}

tasks.register("runAcceptanceTests", Exec) {
dependsOn installAcceptanceTestGems
workingDir "${projectDir}/qa"
commandLine "${projectDir}/vendor/jruby/bin/jruby", "-S", "bundle", "exec", "rake", "qa:acceptance:all"
}

tasks.register("generateLicenseReport", JavaExec) {
dependsOn generateLicenseReportInputs
Expand Down
8 changes: 1 addition & 7 deletions ci/acceptance_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,5 @@ else
esac
fi

echo "--- Acceptance: Installing dependencies"
cd $QA_DIR
bundle install

echo "--- Acceptance: Running the tests"
# TODO: figure out how to encapsulate all this in gradle or at least ensure the bundler
# used here ends up using the runtime managed with LS.
rake qa:acceptance:all
./gradlew runAcceptanceTests