device_type: soca9
job_name: SE ${MACHINE} dev-image (LTP/PTEST) ${MANIFEST_BRANCH}-${KERNEL_VERSION_PATCHLEVEL} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 700
  action:
    minutes: 70
  connection:
    minutes: 20
priority: medium
visibility: public

actions:

###################
# dev-image.wic
###################
- deploy:
    timeout:
      minutes: 100
    to: flasher
    images:
      image:
        url: ${WIC_DEV_IMAGE_URL}
        compression: bz2
      layout:
        url: ${WIC_DEV_BMAP_URL}


##########################
# Configure ethernet ports
##########################
- command:
    name: j17_off
- command:
    name: j21_on
- command:
    name: j22_off
- command:
    name: j23_off
- command:
    name: j24_off

- boot:
    timeout:
      minutes: 10
    method: u-boot
    commands:
    - run linux_sd
    auto_login:
      login_prompt: "login:"
      username: root
    prompts:
    - "root@snarc-soca9:"
    - "root@rzn1-snarc:"
    transfer_overlay:
      download_command: udhcpc -i eth1 -n; wget
      unpack_command: tar --touch -C / -xzf

- test:
    timeout:
      minutes: 10
    interactive:
    - name: basic-cmds-wic
      prompts: ["root@snarc-soca9", "root@rzn1-snarc"]
      script:
      - command: uname -a
      - command: cat /proc/device-tree/model ; echo ""
      - command: mount
      - command: ps aux --sort -rss
      - command: cat /proc/meminfo
      - command: cat /proc/cpuinfo
      - command: free -h
      - command: memstat
      - command: mount
      - command: systemctl --no-pager status systemd-resolved
      - command: systemctl --no-pager restart systemd-resolved
      - command: systemctl --no-pager status systemd-resolved
      - command: ifconfig -a
      - command: ping -c 3 github.com
      - command: which docker

##################
# Functional Tests
##################
- test:
    timeout:
      minutes: 600
    definitions:

    - name: meminfo
      from: git
      history: false
      repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git
      branch: master
      path: automated/linux/meminfo/meminfo.yaml

    - name: ltp-default-tests
      from: git
      history: false
      repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git
      branch: master
      path: automated/linux/ltp/ltp.yaml
      parameters:
        SKIP_INSTALL: 'true'
        SKIPFILE: 'skipfile-lkft.yaml'
        BOARD: ${MACHINE}
        TIMEOUT_MULTIPLIER: 3

    - name: linux-ptest
      from: git
      history: false
      repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git
      branch: master
      path: automated/linux/ptest/ptest.yaml
      params:
        EXCLUDE: 'bluez5 bzip2 containerd e2fsprogs libxml2 parted python strace openssh openssl perl dbus-test'

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

notify:
    recipients:
    - to:
        method: email
        email: ralph.siemsen@linaro.org
    criteria:
        status: incomplete
    verbosity: verbose
