device_type: ${DEVICE_TYPE}
job_name: RPB OE boot ${MACHINE} ${MANIFEST_BRANCH} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 60
  action:
    minutes: 10
  connection:
    minutes: 2
priority: medium
visibility: public

context:
  test_character_delay: 10
  kernel_start_message: "EFI stub: Using DTB from configuration table"

protocols:
  lava-lxc:
    name: lxc-hikey-oe
    template: debian
    distribution: debian
    release: stretch

actions:
- deploy:
    namespace: tlxc
    timeout:
      minutes: 15
    to: lxc
    packages:
    - adb
    - fastboot
    os: debian

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

- deploy:
    timeout:
      minutes: 15
    to: fastboot
    namespace: rpb-hikey
    connection: lxc
    images:
      ptable:
        url: http://images.validation.linaro.org/builds.96boards.org/snapshots/reference-platform/components/uefi-staging/49/hikey/release/ptable-linux-8g.img
        reboot: hard-reset
      boot:
        url: ${BOOT_URL}
        reboot: hard-reset
      system:
        url: ${ROOTFS_SPARSE_BUILD_URL}
        compression: gz
        apply-overlay: true
    os: oe
    protocols:
      lava-lxc:
      - action: fastboot-deploy
        request: pre-power-command
        timeout:
          minutes: 2

- boot:
    namespace: rpb-hikey
    auto_login:
      login_prompt: 'login:'
      username: linaro
      login_commands:
        # Become super user to run tests
        - su
    prompts:
    - 'hikey:~'
    - 'root@(.*):(.*)#'
    timeout:
      minutes: 5
    method: grub
    commands: installed
    protocols:
      lava-lxc:
      - action: grub-sequence-action
        request: pre-os-command
        timeout:
          minutes: 2

metadata:
  machine: ${MACHINE}
  manifest branch: ${MANIFEST_BRANCH}
  manifest commit: ${MANIFEST_COMMIT}
  build url: ${BUILD_URL}
  build location: ${BASE_URL}${PUB_DEST}
