device_type: ${DEVICE_TYPE}
job_name: LEDGE RP ${DEVICE_TYPE} ${MANIFEST_BRANCH} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 95
  action:
    minutes: 60
  connection:
    minutes: 5

priority: medium
visibility: public

context:
  test_character_delay: 10

actions:
- deploy:
    timeout:
      minutes: 20
    to: flasher
    images:
      tarball:
        url: ${STM32_FLASH_IMAGE_URL}
      layout:
        url: ${STM32_FLASH_IMAGE_LAYOUT}
    os: oe

- boot:
    timeout:
      minutes: 25
    method: minimal
    auto_login:
      login_prompt: 'login:'
      username: ledge
      password_prompt: "Password:"
      password: ledge
      login_commands:
      - sudo -s
    prompts:
    - 'ledge@debian:~#'
    - '/ #'
    - 'ledge-(.*)# '
    - 'ledge-(.*)~: '
    - 'ledge-.*:~\$$'

    transfer_overlay:
      download_command: /sbin/udhcpc -i eth0; cd /tmp ; wget
      unpack_command: tar -C / -xzf

- test:
    timeout:
        minutes: 45
    definitions:
        - repository: https://git.linaro.org/ledge/lava-test-definitions.git
          from: git
          path: ledge/tpm2-test.yaml
          name: TPMv2-testsuite

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