device_type: hi6220-hikey
job_name: lxc-hi6220-hikey
timeouts:
  job:
    minutes: 60
  action:
    minutes: 15
  connection:
    minutes: 2
priority: medium
visibility: public

metadata:
  source: https://git.linaro.org/lava-team/refactoring.git
  path: hi6220-hikey.yaml

protocols:
  lava-lxc:
    name: lxc-hikey-test
    template: debian
    distribution: debian
    release: jessie
    mirror: http://mirror.bytemark.co.uk/debian
    verbose: true

actions:
# DEPLOY_LXC_BLOCK
- deploy:
    namespace: tlxc
    timeout:
      minutes: 5
    to: lxc
    packages:
    - android-tools-adb
    - android-tools-fastboot

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

# DEPLOY_TARGET_BLOCK
- deploy:
    timeout:
      minutes: 15
    namespace: droid
    to: fastboot
    images:
      ptable:
        url: http://example.com/hikey/ptable-aosp-8g.img
        reboot: hard-reset
      boot:
        url: http://example.com/hikey/boot.img.xz
        compression: xz
        reboot: hard-reset
      cache:
        url: http://example.com/hikey/cache.img.xz
        compression: xz
      userdata:
        url: http://example.com/hikey/userdata.img.xz
        compression: xz
      system:
        url: http://example.com/hikey/system.img.xz
        sha256sum: e0e82b5adfae84ff97f4f6488e5b4c64b0dfc7ad8a37b4bcbb887d9f85a6be0a
        compression: xz
    protocols:
      lava-lxc:
      - action: fastboot-deploy
        request: pre-power-command
        timeout:
          minutes: 2

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

- test:
    namespace: tlxc
    timeout:
      minutes: 10
    definitions:
    - from: inline
      repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: check-devices
          description: "LXC dev list"
        run:
          steps:
          - /sbin/ifconfig
      name: lxc-dev-inline
      path: inline/lxc-dev.yaml
    - repository: https://git.linaro.org/lava-team/refactoring.git/
      from: git
      path: android/lava-android-basic-lxc.yaml
      name: v2-make-adb-connection

