aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2017-10-31 14:45:45 -0600
committerFathi Boudra <fathi.boudra@linaro.org>2017-11-09 16:04:01 +0000
commit8a45e51612b088ecf3d304b6846305e3815664f5 (patch)
tree56826df864e6a56f1a3c8174d5513df11dce0bad
parentee792dc485fee62a303c6eee72246b611a4f4e6c (diff)
downloadconfigs-8a45e51612b088ecf3d304b6846305e3815664f5.tar.gz
openembedded-armv8-ilp32: submit HiKey ILP32 LTP to LAVA
Change-Id: I4fdd399afb0ca0eb6ab81cb2f73e15a54bca1220 Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
-rw-r--r--openembedded-armv8-ilp32.yaml54
-rw-r--r--openembedded-armv8/lava-job-definitions/hi6220-hikey/master-template-ltp.yaml.jinja2157
2 files changed, 209 insertions, 2 deletions
diff --git a/openembedded-armv8-ilp32.yaml b/openembedded-armv8-ilp32.yaml
index 3ad4f830e..6fadc1a2f 100644
--- a/openembedded-armv8-ilp32.yaml
+++ b/openembedded-armv8-ilp32.yaml
@@ -7,12 +7,20 @@
anonymous:
- job-read
- job-extended-read
+ - job-workspace
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
+ parameters:
+ - string:
+ name: PUB_DEST
+ default: 'openembedded/images/${rootfs}-armv8-ilp32-gcc-${gcc_version}/${MACHINE}/${BUILD_NUMBER}'
+ - string:
+ name: LAVA_SERVER
+ default: 'validation.linaro.org/RPC2/'
disabled: false
node: build
display-name: 'OpenEmbedded ARMv8 ILP32'
@@ -98,13 +106,55 @@
- shell: |
#!/bin/bash
+ # Create sparse image
+ # Only the LTP image is sent to LAVA, hence it is the only one
+ # needing a sparse image to be published.
+ if [ "${rootfs}" = "minimal-ltp" ]; then
+ cd out/
+ rootfsext=$(ls -1 linaro-image-${rootfs}-${MACHINE}-*.rootfs.ext4.gz
+ gunzip -k ${rootfsext}
+ sudo ext2simg -v ${rootfsext%.gz} ${rootfsext%.ext4.gz}.img
+ rm -f ${rootfsext%.gz}
+ gzip -9 ${rootfsext%.ext4.gz}.img
+ cd -
+ fi
+
# Publish
test -d ${HOME}/bin || mkdir ${HOME}/bin
wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python ${HOME}/bin/linaro-cp.py \
--api_version 3 \
--link-latest \
- out/ openembedded/images/${rootfs}-armv8-ilp32-gcc-${gcc_version}/${MACHINE}/${BUILD_NUMBER}
+ out/ ${PUB_DEST}
+ - conditional-step:
+ condition-kind: strings-match
+ condition-string1: '${ENV,var="rootfs"}'
+ condition-string2: 'minimal-ltp'
+ steps:
+ - shell: |
+ #!/bin/bash -x
+
+ rm -rf configs
+ git clone --depth 1 http://git.linaro.org/ci/job/configs.git
+
+ export DEVICE_TYPE=hi6220-hikey
+ export BOOT_URL=${PUBLISH_SERVER}/${PUB_DEST}/$(ls out/boot-0.0*.img | xargs basename)
+ export SYSTEM_URL=${PUBLISH_SERVER}/${PUB_DEST}/$(ls out/linaro-image-${rootfs}-${MACHINE}-*.rootfs.img.gz | xargs basename)
+
+ pip install --force-reinstall --user jinja2-cli
+ ${HOME}/.local/bin/jinja2 -D testname=syscalls \
+ configs/openembedded-armv8/lava-job-definitions/${DEVICE_TYPE}/master-template-ltp.yaml.jinja2 \
+ > custom_lava_job_definition.yaml
+
+ cat << EOF > post_build_lava_parameters
+ DEVICE_TYPE=${DEVICE_TYPE}
+ CUSTOM_YAML_URL=${JOB_URL}/ws/custom_lava_job_definition.yaml
+ LAVA_SERVER=${LAVA_SERVER}
+ EOF
+ - trigger-builds:
+ - project: 'post-build-lava'
+ property-file: post_build_lava_parameters
+ block: true
publishers:
- email:
- recipients: 'fathi.boudra@linaro.org koen.kooi@linaro.org'
+ recipients: 'fathi.boudra@linaro.org koen.kooi@linaro.org daniel.diaz@linaro.org'
diff --git a/openembedded-armv8/lava-job-definitions/hi6220-hikey/master-template-ltp.yaml.jinja2 b/openembedded-armv8/lava-job-definitions/hi6220-hikey/master-template-ltp.yaml.jinja2
new file mode 100644
index 000000000..2652ac356
--- /dev/null
+++ b/openembedded-armv8/lava-job-definitions/hi6220-hikey/master-template-ltp.yaml.jinja2
@@ -0,0 +1,157 @@
+context:
+ test_character_delay: 10
+
+device_type: hi6220-hikey
+job_name: armv8-ilp32-ltp-{{testname}}-${BUILD_NUMBER}
+timeouts:
+ job:
+ minutes: 60
+ action:
+ minutes: 10
+ connection:
+ minutes: 2
+priority: medium
+visibility: public
+
+# run udhcpc in the test shell before accessing the internet
+
+metadata:
+ build-location: ${PUBLISH_SERVER}/${PUB_DEST}
+ series: ilp32
+
+protocols:
+ lava-lxc:
+ name: lxc-hikey-oe
+ template: debian
+ distribution: debian
+ release: jessie
+ arch: amd64
+ mirror: http://mirror.bytemark.co.uk/debian
+
+actions:
+- deploy:
+ namespace: tlxc
+ timeout:
+ minutes: 15
+ to: lxc
+ packages:
+ - wget
+ - unzip
+ os: debian
+
+- boot:
+ namespace: tlxc
+ prompts:
+ - 'root@(.*):/#'
+ - 'hikey:/'
+ timeout:
+ minutes: 5
+ method: lxc
+
+- test:
+ namespace: tlxc
+ timeout:
+ minutes: 10
+ definitions:
+ - from: inline
+ name: install-google-fastboot
+ path: inline/install-google-fastboot.yaml
+ repository:
+ metadata:
+ format: Lava-Test Test Definition 1.0
+ name: install-fastboot
+ description: "Install fastboot provided by google"
+ run:
+ steps:
+ - wget https://dl.google.com/android/repository/platform-tools_r26.0.0-linux.zip
+ - unzip platform-tools_r26.0.0-linux.zip
+ - ln -s `pwd`/platform-tools/fastboot /usr/bin/fastboot
+ - ln -s `pwd`/platform-tools/adb /usr/bin/adb
+ - fastboot --version
+
+- deploy:
+ timeout:
+ minutes: 15
+ to: fastboot
+ namespace: hikey-oe
+ connection: lxc
+ images:
+ ptable:
+ url: http://releases.linaro.org/reference-platform/embedded/hikey/16.12/rpb/bootloader/ptable-linux-8g.img
+ reboot: hard-reset
+ boot:
+ url: ${BOOT_URL}
+ reboot: hard-reset
+ system:
+ url: ${SYSTEM_URL}
+ compression: gz
+ apply-overlay: true
+ # ensure that this job raises a network interface with DHCP before relying on internet access
+ os: oe
+ protocols:
+ lava-lxc:
+ - action: fastboot-deploy
+ request: pre-power-command
+ timeout:
+ minutes: 2
+
+- boot:
+ namespace: hikey-oe
+ auto_login:
+ login_prompt: 'login:'
+ username: linaro
+ login_commands:
+ # Become super user to run tests
+ - su
+ prompts:
+ - 'hikey:~'
+ - 'root@(.*):(.*)#'
+ timeout:
+ minutes: 5
+ method: uefi-menu
+ commands: fastboot
+ protocols:
+ lava-lxc:
+ # other action could be boot-fastboot
+ - action: uefi-commands
+ request: pre-os-command
+ timeout:
+ minutes: 2
+- test:
+ namespace: hikey-oe
+ timeout:
+ minutes: 60
+ 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: git://git.linaro.org/qa/test-definitions.git
+ from: git
+ path: automated/linux/ltp/ltp.yaml
+ parameters:
+ SKIP_INSTALL: 'true'
+ TST_CMDFILES: '{{testname}}'
+ SKIPFILE: 'skipfile-lkft-hikey'
+ TIMEOUT_MULTIPLIER: 3
+ name: ltp-{{testname}}-tests
+ timeout:
+ minutes: 60