device_type: fsl-imx8mq-evk-linux
job_name: imx8mqevk first job

timeouts:
  job:
    minutes: 15
  action:
    minutes: 5
  connection:
    minutes: 2
priority: medium
visibility: public

# context allows specific values to be overridden or included
context:
  arch: arm64
 
metadata:
  docs-source: health-checks
  docs-filename: /etc/lava-server/dispatcher-config/health-checks

# ACTION_BLOCK
actions:
- deploy:
    namespace: imx8m
    timeout:
      minutes: 15
    to: tftp
    kernel:
      url: file:/mnt/images/AF-ref/Image
      type: image
    nfsrootfs:
      url: file:/mnt/images/AF-ref/fsl-image-af-freertos-imx8mqevk.tar.bz2
      compression: bz2
    dtb:
      url: file:/mnt/images/AF-ref/fsl-imx8mq-evk-af.dtb
    os: debian

- boot:
    namespace: imx8m
    connection: telnet localhost 7001
    method: u-boot
    commands: nfs
    auto_login:
      login_prompt: "imx8mqevk login:"
      username: root
    prompts:
    - 'root@imx8mqevk:~#'
    timeout:
      minutes: 3 



- test:
    namespace: imx8m
    connection: telnet localhost 7001
    timeout:
      minutes: 1
    definitions:
    - from: inline
      name: AF-minimal
      path: inline/imx8m-linux.yaml
      repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: AF-minimal
          description: "Performing some basic commands on the target"
        run:
          steps:
          - hostname
          - ifconfig
          - pwd
          - ls -l
          - cd /home/root/jailhouse
          - ./jinit.sh
          - ./jstart.sh /home/root/jailhouse/freertos/pp_sample.bin
          - sleep 10

# startup the extra UART
- boot:
# make the connection to the second uart for use in the test shell
    namespace: isolation
    connection: uart1
    method: new_connection
    prompts: 
      - 'SHELL>>'
    timeout:
      seconds: 30

- test:
    namespace: imx8m
    connection-namespace: isolation
    timeout:
      minutes: 1
    definitions:
    - from: inline
      name: AF-shell
      path: inline/imx8m-shell.yaml
      repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: AF-shell
          description: "Performing some basic commands on the shell"
        run:
          steps:
          - lava-test-case simpletestcase --result pass
