job_name: multinode-lxc-fastboot-get-adb-serial
timeouts:
  job:
    minutes: 15
  action:
    minutes: 5
priority: medium
visibility: public
reboot_to_fastboot: false

protocols:
  lava-multinode:
    roles:
      master:
        count: 1
        device_type: nexus4
      worker:
        count: 1
        device_type: nexus4
  lava-lxc:
    master:
      name: lxc-master
      template: ubuntu
      distribution: ubuntu
      release: xenial
      arch: amd64
    worker:
      name: lxc-worker
      template: ubuntu
      distribution: ubuntu
      release: xenial
      arch: amd64

actions:
- deploy:
    namespace: tlxc
    role:
    - master
    - worker
    timeout:
      minutes: 5
    to: lxc
    packages:
    - android-tools-adb
    - android-tools-fastboot
    os: ubuntu

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

- boot:
    namespace: droid
    role:
    - master
    - worker
    timeout:
      minutes: 15
    method: fastboot

- test:
    namespace: tlxc
    role:
    - master
    - worker
    timeout:
      minutes: 5
    definitions:
    - repository: https://git.linaro.org/lava-team/lava-functional-tests.git
      from: git
      path: lava-test-shell/android/get-adb-serial-jessie.yaml
      name: get-nexus4-serial
