# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Google Cloud Documentation: https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
# Flank Documentation: https://flank.github.io/flank/
#
# This flank config is used to check memory leaks in tests annotated with @DetectLeaks
gcloud:
  results-bucket: fenix_test_artifacts
  record-video: true
  timeout: 15m
  async: false
  num-flaky-test-attempts: 1

  app: /app/path
  test: /test/path

  auto-google-login: false
  use-orchestrator: true
  environment-variables:
    clearPackageData: true
    additionalTestOutputDir: /sdcard/Download
    detect-leaks: true # to enable memory leak checks
  directories-to-pull:
    - /sdcard/Android/data/org.mozilla.fenix.debug/minidumps
    - /sdcard/Download/memory_leaks
  other-files:
    /data/local/tmp/org.mozilla.fenix.debug-geckoview-config.yaml: geckoview-configs/org.mozilla.fenix.debug-geckoview-config.yaml
  performance-metrics: true

  test-targets:
    - notPackage org.mozilla.fenix.syncintegration
    - notPackage org.mozilla.fenix.experimentintegration
    - notPackage org.mozilla.fenix.ui.efficiency.tests
    - notPackage org.mozilla.fenix.ui.efficiency.examples
    - notAnnotation org.mozilla.fenix.customannotations.SkipLeaks
    - notPackage org.mozilla.fenix.ui.efficiency.navigation.reachability.shards
    - notPackage org.mozilla.fenix.ui.efficiency.navigation.pairs.shards
    - notPackage org.mozilla.fenix.ui.efficiency.navigation.interaction.shards

  device:
    - model: MediumPhone.arm
      version: 34
      locale: en_US

flank:
  project: GOOGLE_PROJECT
  max-test-shards: 100
  num-test-runs: 1
  output-style: compact
  full-junit-result: true
