device_type: hi6220-hikey
job_name: "%%JOB_NAME%%-%%ANDROID_META_BUILD%%-basic"

tags:
- aosp-only

timeouts:
  job:
    minutes: 120
  action:
    minutes: 15
  connection:
    minutes: 2
priority: medium
visibility: public

metadata:
  android.build: "%%ANDROID_META_BUILD%%"
  android.name: "%%ANDROID_META_NAME%%"
  android.url: "%%ANDROID_META_URL%%"

protocols:
  lava-lxc:
    name: lxc-hikey-test
    distribution: ubuntu
    release: xenial
    arch: amd64
    verbose: true

actions:
- deploy:
    namespace: tlxc
    timeout:
      minutes: 5
    to: lxc
    packages:
    - android-tools-adb
    - android-tools-fastboot
    - systemd
    - systemd-sysv
    - ca-certificates
    os: debian

- boot:
    namespace: tlxc
    prompts:
    - 'root@(.*):/#'
    - 'hikey:/'
    timeout:
      minutes: 5
    method: lxc

- deploy:
    timeout:
      minutes: 30
    to: fastboot
    namespace: droid
    images:
      ptable:
        url: http://releases.linaro.org/96boards/archive/reference-platform/aosp/hikey/16.03/bootloader/ptable-aosp-8g.img
      boot:
        url: "%%DOWNLOAD_URL%%/boot.img.xz"
        compression: xz
      cache:
        url: "%%ANDROID_CACHE%%"
        compression: xz
      userdata:
        url: "%%ANDROID_DATA%%"
        compression: xz
      system:
        url: "%%ANDROID_SYSTEM%%"
        compression: xz
    os: debian

- boot:
    namespace: droid
    prompts:
    - 'root@(.*):/#'
    - 'hikey:/'
    timeout:
      minutes: 15
    method: fastboot

- test:
      namespace: tlxc
      connection: lxc
      timeout:
        minutes: 30
      definitions:
        - repository: https://git.linaro.org/qa/test-definitions.git
          from: git
          path: automated/android/boottime/boottime.yaml
          name: boottime-test
