timeouts:
  job:
    minutes: 130
  connection:
    minutes: 2
context:
  test_character_delay: 10
device_type: hi6220-hikey-r2
job_name: linux-mainline-oe--ltp-quickhit-mainline-822
priority: high
visibility: public
metadata:
  git branch: mainline
  git repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
  git commit: v5.5-rc1-12-g6794862a16ef
  git describe: v5.5-rc1-12-g6794862a16ef
  make_kernelversion: 5.4-rc8
  kernel-config: http://storage.staging.lkft.org}/mainline/master/v5.5-rc1-12-g6794862a16ef/arm64/defconfig%2Blkft/gcc-8/kernel.config
  kernel-defconfig: http://storage.staging.lkft.org/mainline/master/v5.5-rc1-12-g6794862a16ef/822/defconfig
  build-url: http://ci.staging.lkft.org/job/kernel-arch-complete/822/
  build-location: http://storage.staging.lkft.org/mainline/master/v5.5-rc1-12-g6794862a16ef
  toolchain: unknown
  series: lkft
  email-notification: ''
  ltp-quickhit-tests__url: unknown
  ltp-quickhit-tests__version: unknown
  ltp-quickhit-tests__revision: unknown
protocols:
  lava-lxc:
    name: lxc-target
    template: debian
    distribution: debian
    release: buster
    arch: amd64
    mirror: http://deb.debian.org/debian
actions:
- deploy:
    namespace: tlxc
    timeout:
      minutes: 15
    to: lxc
    packages:
    - wget
    - unzip
    - abootimg
    - android-tools-fsutils
    - cpio
    - curl
    - e2fsprogs
    - file
    - git
    - libguestfs-tools
    - mkbootimg
    - xz-utils
    os: debian
- boot:
    namespace: tlxc
    prompts:
    - root@(.*):/#
    timeout:
      minutes: 5
    method: lxc
- test:
    namespace: tlxc
    timeout:
      minutes: 10
    definitions:
    - repository: https://github.com/Linaro/test-definitions.git
      from: git
      path: automated/linux/android-platform-tools/install.yaml
      name: install-android-platform-tools-r2800
      parameters:
        LINK: https://dl.google.com/android/repository/platform-tools_r28.0.0-linux.zip
- deploy:
    timeout:
      minutes: 40
    to: download
    namespace: target
    images:
      ptable:
        url: http://images.validation.linaro.org/snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/69/hikey/release/ptable-linux-8g.img
      boot:
        url: http://storage.staging.lkft.org/rootfs/oe-lkft-sumo/hikey/74/boot-0.0+AUTOINC+2d8c108bf0-ed8112606c-r0-hikey-20190911025241.uefi.img
      kernel:
        url: http://storage.staging.lkft.org}/mainline/master/v5.5-rc1-12-g6794862a16ef/arm64/defconfig%2Blkft/gcc-8/Image
      dtb:
        url: http://storage.staging.lkft.org}/mainline/master/v5.5-rc1-12-g6794862a16ef/arm64/defconfig%2Blkft/gcc-8/dtbs/hisilicon/hi6220-hikey.dtb
      modules:
        url: http://storage.staging.lkft.org}/mainline/master/v5.5-rc1-12-g6794862a16ef/arm64/defconfig%2Blkft/gcc-8/modules.tar.xz
      system:
        url: http://storage.staging.lkft.org/rootfs/oe-lkft-sumo/hikey/74/rpb-console-image-lkft-hikey-20191216215523.rootfs.ext4.gz
        apply-overlay: true
    os: oe
- test:
    namespace: tlxc
    timeout:
      minutes: 60
    definitions:
    - from: inline
      name: kir
      path: inline/kir.yaml
      repository:
        metadata:
          description: Squash kernel, dtb and modules into rootfs
          format: Lava-Test Test Definition 1.0
          name: resize-rootfs
        run:
          steps:
          - pwd
          - cd /lava-lxc
          - git clone -b master https://github.com/linaro/kir.git
          - ./kir/lava/board_setup.sh hi6220-hikey
- deploy:
    timeout:
      minutes: 40
    to: fastboot
    namespace: target
    images:
      ptable:
        url: lxc:///ptable-linux-8g.img
        reboot: hard-reset
      boot:
        url: lxc:///boot.img
        reboot: hard-reset
      system:
        url: lxc:///rpb-console-image-lkft.rootfs.img
        apply-overlay: true
    os: oe
    protocols:
      lava-lxc:
      - action: fastboot-deploy
        request: pre-power-command
        timeout:
          minutes: 2
- boot:
    namespace: target
    auto_login:
      login_prompt: 'login:'
      username: root
      login_commands:
        # Become super user to run tests
      - su
    prompts:
    - root@(.*):[/~]#
    - hikey:~
    timeout:
      minutes: 15
    method: grub
    commands: installed
    protocols:
      lava-lxc:
      - action: auto-login-action
        request: pre-os-command
        timeout:
          minutes: 2
- test:
    namespace: target
    timeout:
      minutes: 45
    definitions:
    - from: inline
      repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: prep-tests
          description: Device preparation
        run:
          steps:
          # the image does not raise the interface itself
          # force a DHCP request to avoid avahi using a zero conf address.
          # - udhcpc
          # - netstat
          # - ip a
          # - ifconfig
          - df
          - cat /sys/class/thermal/thermal_zone0/policy || true
          - echo "power_allocator" > /sys/class/thermal/thermal_zone0/policy || true
          - cat /sys/class/thermal/thermal_zone0/policy || true
          - cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies  |
            awk '{ print $(NF-1) }'  > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
          - cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq || true
      name: prep-inline
      path: inline/prep.yaml
    - repository: https://github.com/Linaro/test-definitions.git
      from: git
      path: automated/linux/ltp/ltp.yaml
      parameters:
        SKIP_INSTALL: 'true'
        TST_CMDFILES: quickhit
        SKIPFILE: skipfile-lkft.yaml
        BOARD: hi6220-hikey
        BRANCH: mainline
        ENVIRONMENT: production
        TIMEOUT_MULTIPLIER: 3
        LTP_TMPDIR: /scratch
      name: ltp-quickhit-tests
