timeouts:
  job:
    minutes: 65
  connection:
    minutes: 2
context:
  test_character_delay: 10
device_type: hi6220-hikey-r2
job_name: lkft-kselftests-master-latest
priority: 50
visibility: public
metadata:
  git branch: master
  git repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
  git commit: ff5abbe799e29099695cb8b5b2f198dd8b8bdf26
  git describe: v4.14-rc4-84-gff5abbe799e2
  make_kernelversion: 4.14.0-rc4
  kernel-config: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/config
  kernel-defconfig: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/defconfig
  build-url: https://ci.linaro.org/job/openembedded-lkft-linux-mainline/DISTRO=rpb,MACHINE=hikey,label=docker-stretch-amd64/NOT_CORRECT/
  build-location: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest
  toolchain: arm-linaro-linux-gnueabi linaro-6.2
  series: lkft
  email-notification: ''
  kselftest__url: https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.tar.xz
  kselftest__version: '4.13'
  kselftest__revision: g4.13
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:
    - curl
    - img2simg
    - cpio
    - 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-r2600
      parameters:
        LINK: https://dl.google.com/android/repository/platform-tools_r26.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://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/boot-0.0+AUTOINC+2d8c108bf0-ed8112606c-r0-hikey-20191103221706-2223.uefi.img
      dtb:
        url: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/Image--5.3+git0+a99d8080aa-r0-hi6220-hikey-20191103221706-2223.dtb
      kernel:
        url: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/Image--5.3+git0+a99d8080aa-r0-hikey-20191103221706-2223.bin
      modules:
        url: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/modules--5.3+git0+a99d8080aa-r0-hikey-20191103221706-2223.tgz
      rootfs:
        url: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/hikey/lkft/linux-mainline/latest/rpb-console-image-lkft-hikey-20191103221706-2223.rootfs.ext4.gz
        apply-overlay: true
    os: oe
- test:
    namespace: tlxc
    timeout:
      minutes: 30
    definitions:
    - from: inline
      name: resize-rootfs
      path: inline/resize-rootfs.yaml
      repository:
        metadata:
          description: resize rootfs image for test overlay
          format: Lava-Test Test Definition 1.0
          name: resize-rootfs
        run:
          steps:
          - pwd
          - cd /lava-lxc
          - curl -sSOL https://raw.githubusercontent.com/roxell/kir/wip/setup.sh
          - ls
          - chmod +x setup.sh
          - ls
          - ./setup.sh hikey wip2
- deploy:
    timeout:
      minutes: 15
    to: fastboot
    namespace: target
    connection: lxc
    images:
      ptable:
        url: lxc:///ptable-linux-8g.img
        reboot: hard-reset
      boot:
        url: lxc:///boot.uefi.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: linaro
      login_commands:
        # Become super user to run tests
      - su
    prompts:
    - hikey:~
    - hikey:/home/linaro#
    - root@(.*):/#
    timeout:
      minutes: 5
    method: grub
    commands: installed
    protocols:
      lava-lxc:
      # other action could be boot-fastboot
      - action: grub-sequence-action
        request: pre-os-command
        timeout:
          minutes: 2
- test:
    namespace: target
    timeout:
      minutes: 55
    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
    - from: inline
      repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: timesync-off
          description: Disable systemd time sync services
        run:
          steps:
          - systemctl stop systemd-timesyncd || true
      name: timesync-off
      path: inline/timesync-off.yaml
    - repository: https://github.com/Linaro/test-definitions.git
      from: git
      revision: kselftest-5.1
      path: automated/linux/kselftest/kselftest.yaml
      name: kselftest
      parameters:
        KSELFTEST_PATH: /opt/
        SKIPFILE: skipfile-lkft.yaml
        BOARD: hi6220-hikey
        BRANCH: mainline
        ENVIRONMENT: production
