diff --git a/build.gradle b/build.gradle index c016e86b25a..fea8424c939 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/ci/acceptance_tests.sh b/ci/acceptance_tests.sh index ba4aa78f8be..c4f1392b6c4 100755 --- a/ci/acceptance_tests.sh +++ b/ci/acceptance_tests.sh @@ -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 \ No newline at end of file