Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelpasterz committed Aug 9, 2021
1 parent a0605ad commit f49c523
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ private fun AndroidArgs.mainApkContext() = appApk?.let { appApk ->
private fun AndroidArgs.additionalApksContexts() = additionalAppTestApks.map {
val appApk = (it.app ?: appApk)
?: throw FlankGeneralError("Cannot create app-test apks pair for instrumentation tests, missing app apk for test ${it.test}")
val envs = it.environmentVariables.takeIf { envs -> envs.isNotEmpty() } ?: environmentVariables
InstrumentationTestContext(
app = appApk.asFileReference(),
test = it.test.asFileReference(),
environmentVariables = it.environmentVariables.takeIf { envs -> envs.isNotEmpty() } ?: environmentVariables,
environmentVariables = envs,
testTargetsForShard = testTargetsForShard,
args = copy(
commonArgs = commonArgs.copy(
Expand All @@ -55,7 +56,7 @@ private fun AndroidArgs.additionalApksContexts() = additionalAppTestApks.map {
testApk = it.test,
testTargets = it.testTargets ?: testTargets,
parameterizedTests = it.parameterizedTests ?: parameterizedTests,
environmentVariables = it.environmentVariables.takeIf { envs -> envs.isNotEmpty() } ?: environmentVariables,
environmentVariables = envs
)
)
}.toTypedArray()

0 comments on commit f49c523

Please sign in to comment.