Skip to content

Commit

Permalink
Set different paths for smart flank report file
Browse files Browse the repository at this point in the history
As tests between `wordpress` and `jetpack` can differ. A good example is `StatsTests#e2eAllDayStatsLoad` which runs for Jetpack app only.
  • Loading branch information
wzieba committed Jul 31, 2024
1 parent 2908c58 commit 094a51e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ plugins {
fladle {
configs {
wordpress {
debugApk.set(pathForVariant("wordpress", "debugApk"))
instrumentationApk.set(pathForVariant("wordpress", "instrumentationApk"))
def app = "wordpress"
debugApk.set(pathForVariant(app, "debugApk"))
instrumentationApk.set(pathForVariant(app, "instrumentationApk"))
smartFlankGcsPath.set(pathForSmartFlankGcsPath(app))
}
jetpack {
debugApk.set(pathForVariant("jetpack", "debugApk"))
instrumentationApk.set(pathForVariant("jetpack", "instrumentationApk"))
def app = "jetpack"
debugApk.set(pathForVariant(app, "debugApk"))
instrumentationApk.set(pathForVariant(app, "instrumentationApk"))
smartFlankGcsPath.set(pathForSmartFlankGcsPath(app))
}
}
serviceAccountCredentials = new File(System.getProperty("user.home"), ".configure/wordpress-android/secrets/firebase.secrets.json")
Expand All @@ -39,7 +43,6 @@ fladle {

maxTestShards = 50
shardTime = 120
smartFlankGcsPath = "gs://fladle/wordpress-android/smart-flank/JUnitReport.xml"
}

String pathForVariant(String app, String type) {
Expand All @@ -54,6 +57,10 @@ String pathForVariant(String app, String type) {
return new File(layout.buildDirectory.dir(path).get().asFile, '*.apk').absolutePath
}

static String pathForSmartFlankGcsPath(String app) {
return "gs://fladle/wordpress-android/${app}/smart-flank/JUnitReport.xml"
}

sentry {
tracingInstrumentation {
enabled = true
Expand Down

0 comments on commit 094a51e

Please sign in to comment.