Skip to content

Commit

Permalink
If robo test not set env variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamfilipow92 committed Jun 3, 2020
1 parent edb3464 commit a390983
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion test_runner/src/main/kotlin/ftl/gc/GcAndroidTestMatrix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ftl.gc
import com.google.api.services.testing.Testing
import com.google.api.services.testing.model.Account
import com.google.api.services.testing.model.AndroidDeviceList
import com.google.api.services.testing.model.AndroidInstrumentationTest
import com.google.api.services.testing.model.ClientInfo
import com.google.api.services.testing.model.EnvironmentMatrix
import com.google.api.services.testing.model.EnvironmentVariable
Expand Down Expand Up @@ -62,7 +63,7 @@ object GcAndroidTestMatrix {
.setAdditionalApks(additionalApkGcsPaths.mapGcsPathsToApks())
.setFilesToPush(otherFiles.mapToDeviceFiles())

if (args.environmentVariables.isNotEmpty()) {
if (args.environmentVariables.isNotEmpty() && androidTestConfig is AndroidTestConfig.Instrumentation) {
testSetup.environmentVariables =
args.environmentVariables.map { it.toEnvironmentVariable() }
}
Expand Down
4 changes: 2 additions & 2 deletions test_runner/src/test/kotlin/Debug.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ fun main() {
// run "gradle check" to generate required fixtures
val projectId = System.getenv("GOOGLE_CLOUD_PROJECT")
?: "YOUR PROJECT ID"
val quantity = "single"
val type = "robo"
val quantity = "multiple"
val type = "mixed"

// Bugsnag keeps the process alive so we must call exitProcess
// https://github.com/bugsnag/bugsnag-java/issues/151
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ gcloud:
app: ./src/test/kotlin/ftl/fixtures/tmp/apk/app-debug.apk
robo-script: ./src/test/kotlin/ftl/fixtures/test_app_cases/MainActivity_robo_script.json
num-flaky-test-attempts: 2

environment-variables:
coverage: true
coverageFilePath: /sdcard/
clearPackageData: true
flank:
disable-sharding: false
max-test-shards: 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
gcloud:
app: ./src/test/kotlin/ftl/fixtures/tmp/apk/app-debug.apk
# robo-script: ./src/test/kotlin/ftl/fixtures/test_app_cases/MainActivity_robo_script.json
robo-directives:
"click:button3": ""
"ignore:button1": ""
"ignore:button2": ""
robo-script: ./src/test/kotlin/ftl/fixtures/test_app_cases/MainActivity_robo_script.json
environment-variables:
coverage: true
coverageFilePath: /sdcard/
Expand Down

0 comments on commit a390983

Please sign in to comment.