timeouts:
  job:
    minutes: 20
  connection:
    minutes: 2
context:
  test_character_delay: 10
device_type: x15-bl
job_name: X15-bl flasher health check
priority: 50
visibility: public
metadata:
  build-url: ''
actions:
- deploy:
    timeout:
      minutes: 40
    to: downloads
    images:
      kernel:
        url: https://snapshots.linaro.org/components/kernel/u-boot/132/MLO
      dtb:
        url: https://snapshots.linaro.org/components/kernel/u-boot/132/u-boot.img
    postprocess:
      docker:
        image: roxell/kir
        steps:
        - pwd
        - ls -l
        - /kir/create-uboot.py --mlo MLO --uboot u-boot.img --output_file x15-u-boot.img
- deploy:
    timeout:
      minutes: 40
    to: flasher
    docker:
      image: roxell/kir
    images:
      image:
        url: downloads://x15-u-boot.img

- boot:
    prompts:
    - =>
    - root@(.*):[/~]#
    timeout:
      minutes: 1
    method: bootloader
    bootloader: u-boot
    commands: []
- test:
    timeout:
      minutes: 10
    interactive:
    - name: basic-cmds
      prompts: ['=> ', '/ # ']
      script:
      - command: echo "u-boot echo test"
        name: echo
        successes:
        - message: u-boot echo test
      - command: version
        name: version
        successes:
        - message: 2020.01-00613-gd7bb6aceb2
      - command: help test
        name: help
        successes:
        - message: test - minimal test like /bin/sh
      # saveenv and printenv
      - command: setenv test_var test123printenv
      - command: printenv
        name: setenv-and-printenv
        successes:
        - message: test_var=test123
    - name: memory-test
      prompts: ['=> ', '/ # ']
      script:
      # memory test
      # base - print or set address offset
      - command: base
        name: print-default-base-address-offset
        successes:
        - message: 'Base Address: 0x'
      - command: base 80000000
        name: set-address-offset-0x80000000
        successes:
        - message: 'Base Address: 0x80000000'
      - command: base
        name: check-address-offset-0x80000000
        successes:
        - message: 'Base Address: 0x80000000'
      # crc32 - checksum calculation
      - command: mw.b 00000000 aa 400
      - command: crc 80000000 400
        name: compute-CRC32-checksum
        successes:
        - message: crc32 for 80000000 ... 800003ff ==> 3c6f327d
      # mw - memory write
      # md - memory display
      - command: mw 100000 aabbccdd 10
      - command: md 100000 10
        name: mw-md-100000
        successes:
        - message: aabbccdd
      # md - memory display
      # cp - memory copy
      - command: cp 100000 200000 10
      - command: md 200000 10
        name: cp-md-200000
        successes:
        - message: aabbccdd
      # cmp - memory compare
      - command: cmp 100000 200000 10
        name: cmp-100000-200000-10
        successes:
        - message: Total of 16 word\(s\) were the same
    - name: dhcp-cmds
      prompts: ['=> ', '/ # ']
      script:
      # dhcp
      - command: setenv autoload no ; dhcp
        name: dhcp
        successes:
        - message: DHCP client bound to address

