Skip to content

Commit 8ea0d56

Browse files
committed
Merge branch 'master' into DEV-852
2 parents 041ffb1 + 502f1ba commit 8ea0d56

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

ShimmerDriver/build.gradle

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,24 @@ dependencies {
138138
implementation("org.bouncycastle:bcprov-jdk15on:1.61")
139139
implementation 'net.java.dev.jna:jna:5.18.1'
140140
implementation 'net.java.dev.jna:jna-platform:5.18.1'
141-
}
141+
}
142+
143+
// --- AWS SAM / Lambda build: skip tests ----------------------------------------------------
144+
// ShimmerDriver is a member of the ASM_PC Lambda projects' multi-project builds: each ASM_PC
145+
// build root does "include ':ShimmerDriver'" with a projectDir retargeted into ASM_PC's
146+
// Shimmer-Java-Android-API git submodule (DEV-928). AWS SAM (aws-lambda-builders) runs an
147+
// unqualified `gradle build`, which runs `test` on every project in such a build - including
148+
// this one. Skip tests when SAM is driving the build (it sets the system property below).
149+
// They still run everywhere else: via `gradlew test`, in this repo's CI (gradle.yml builds
150+
// ShimmerDriverPC without -x test, which runs these tests as a subproject), and ASM_PC's
151+
// deploy workflows exclude them explicitly with -x test.
152+
// Set GRADLE_SAM_EXECUTE_TEST (to any value) to force them on under SAM.
153+
// NB: extend by adding another onlyIf { } (they AND-compose); do not convert this to an
154+
// `onlyIf = { ... }` assignment - that would silently erase the guard.
155+
tasks.withType(Test).configureEach {
156+
onlyIf {
157+
System.getProperty('software.amazon.aws.lambdabuilders.scratch-dir') == null ||
158+
System.getenv('GRADLE_SAM_EXECUTE_TEST') != null
159+
}
160+
}
142161

0 commit comments

Comments
 (0)