device_type: qemu
job_name: LEDGE RPB OE edk2 boot ${MACHINE} ${MANIFEST_BRANCH} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 55
  action:
    minutes: 25
  connection:
    minutes: 2
priority: 25
visibility: public

context:
  arch: x86_64
  netdevice: user
  guestfs_interface: virtio

actions:
- deploy:
    namespace: target
    timeout:
      minutes: 15
    to: tmpfs
    images:
      rootfs:
        image_arg: -drive id=disk0,file={rootfs},format=raw
          -m 2048 -smp 4 -serial mon:stdio -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -device i6300esb,id=watchdog0
        url: ${SYSTEM_URL}
        compression: gz
        apply-overlay: true
        sparse: false
      bios:
        image_arg: -drive if=pflash,format=raw,file={bios}
        url: ${FIRMWARE_EDK2}
    os: oe

- boot:
    namespace: target
    timeout:
      minutes: 60
    method: qemu
    media: tmpfs
    docker:
      image: linaro/ci-amd64-ledge:stable
      binary: /usr/bin/qemu-system-x86_64
    auto_login:
      login_prompt: 'login:'
      username: ledge
      password_prompt: 'Password:'
      password: ledge
      login_commands:
      - sudo -s
    prompts:
    - ledge-.*:~\$$
    - ledge-qemux86-64:/(.*)#

- test:
    namespace: target
    timeout:
      minutes: 15
    definitions:
    - repository: https://github.com/Linaro/test-definitions.git
      from: git
      path: automated/linux/fwts/fwts.yaml
      name: fwts-unit-tests

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