Skip to content

Commit

Permalink
Fix --app & --test on Android CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Jun 19, 2019
1 parent 6844b48 commit bcb05e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## next (unreleased)

- [#567](https://github.com/TestArmada/flank/pull/567) Fix `--app` & `--test` on Android CLI. ([bootstraponline](https://github.com/bootstraponline))

## v6.2.2

- [#566](https://github.com/TestArmada/flank/pull/566) Fix `--test` & `--xctestrun-file` on iOS CLI. ([bootstraponline](https://github.com/bootstraponline))
Expand Down
5 changes: 3 additions & 2 deletions test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import ftl.args.yml.YamlDeprecated
import ftl.cli.firebase.test.android.AndroidRunCommand
import ftl.config.Device
import ftl.config.FtlConstants
import ftl.util.Utils.fatalError
import java.nio.file.Files
import java.nio.file.Path

Expand All @@ -47,8 +48,8 @@ class AndroidArgs(
override val flakyTestAttempts = cli?.flakyTestAttempts ?: gcloud.flakyTestAttempts

private val androidGcloud = androidGcloudYml.gcloud
var appApk = cli?.app ?: androidGcloud.app
var testApk = cli?.test ?: androidGcloud.test
var appApk = cli?.app ?: androidGcloud.app ?: fatalError("app is not set")
var testApk = cli?.test ?: androidGcloud.test ?: fatalError("test is not set")
val autoGoogleLogin = cli?.autoGoogleLogin ?: cli?.noAutoGoogleLogin?.not() ?: androidGcloud.autoGoogleLogin

// We use not() on noUseOrchestrator because if the flag is on, useOrchestrator needs to be false
Expand Down
9 changes: 2 additions & 7 deletions test_runner/src/main/kotlin/ftl/args/yml/AndroidGcloudYml.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import ftl.util.Utils.assertNotEmpty
*/
@JsonIgnoreProperties(ignoreUnknown = true)
class AndroidGcloudYmlParams(
val app: String = "",
val test: String = "",
val app: String? = null,
val test: String? = null,

@field:JsonProperty("auto-google-login")
val autoGoogleLogin: Boolean = true,
Expand Down Expand Up @@ -46,11 +46,6 @@ class AndroidGcloudYmlParams(
"directories-to-pull", "performance-metrics", "test-runner-class", "test-targets", "device"
)
}

init {
assertNotEmpty(app, "app is not set")
assertNotEmpty(test, "test is not set")
}
}

@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down

0 comments on commit bcb05e6

Please sign in to comment.