From a1ca62029f24c088ac9b7096c78b8677f5f69052 Mon Sep 17 00:00:00 2001 From: Gaston Thea Date: Mon, 28 Oct 2024 14:44:12 -0300 Subject: [PATCH] harness agent --- build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.gradle b/build.gradle index 71a978bf1..0d9b5ffa6 100644 --- a/build.gradle +++ b/build.gradle @@ -291,6 +291,26 @@ task javadocJar(type: Jar, dependsOn: javadoc) { from javadoc.destinationDir } +// This adds HARNESS_JAVA_AGENT to the testing command if it's +// provided through the command line. +// Local builds will still remain same as it only adds if the +// parameter is provided. +tasks.withType(Test) { + if(System.getProperty("HARNESS_JAVA_AGENT")) { + jvmArgs += [System.getProperty("HARNESS_JAVA_AGENT")] + } +} + +// This makes sure that any test tasks for subprojects don't +// fail in case the test filter does not match. +gradle.projectsEvaluated { + tasks.withType(Test) { + filter { + setFailOnNoMatchingTests(false) + } + } +} + artifacts { archives sourcesJar archives javadocJar