Skip to content
Snippets Groups Projects
Commit 2ab988c6 authored by Daniel Thompson's avatar Daniel Thompson
Browse files

Split wget-smoke based on session name

parent 4638351d
No related branches found
No related tags found
No related merge requests found
#
# qemu_alpine.yaml
# wget-smoke-inline.yaml
#
# Exaple QEMU job
# LAVA job definition that runs some simple networking tests
# (defined inline) on a QEMU VM.
#
---
......@@ -66,3 +67,7 @@ actions:
- lava-test-case fetch-index --shell wget http://does.not.exist
- lava-test-case html-check --shell grep -q '<html' index.html
- rm -f index.html
#- name: wget-smoke
# repository: https://git.codelinaro.org/linaro/training/test-definitions.git
# from: git
# path: lva01-lava_for_users-part_1/wget-smoke/wget-smoke.yaml
#!/bin/sh
wget_test () {
f=$(echo $1 | cut -f3 -d/)
lava-test-case fetch-from-$f --shell wget -O $f.html $1
lava-test-case html-check-$f --shell grep -q html $f.html
}
timed_test () {
f=$(echo $1 | cut -f3 -d/)
time -o timings echo "Replace this echo with test command"
if [ $? -eq 0 ]
then
elapsed=$(sed -e 's/m//' -e 's/s//' timings | awk '/real/ {print $2*60+$3}')
lava-test-case benchmark-$f --result pass --measurement $elapsed --units seconds
else
lava-test-case benchmark-$f --result fail
fi
}
wget_test http://fileserver
wget_test https://google.com
timed_test http://fileserver
timed_test https://google.com
---
metadata:
name: wget-smoke
format: "Lava-Test-Shell Test Definition 1.0"
description: "Simple network tests"
version: 1.0
run:
steps:
- "(cd lva01-lava_for_users-part_1/wget-smoke; ./wget-smoke.sh)"
#
# wget-smoke-inline.yaml
#
# LAVA job definition that runs some simple networking tests
# on a QEMU VM.
#
---
device_type: "qemu"
job_name: "wget-smoke-test@qemu-arm64"
priority: "medium"
visibility: "public"
context:
arch: "arm64"
machine: "virt"
netdevice: user
cpu: "cortex-a57"
memory: "4G"
extra_options: ["-no-reboot", "-smp 2"]
timeouts:
job: {minutes: 15}
action: {minutes: 10}
connection: {minutes: 10}
actions:
- deploy:
to: tmpfs
timeout: {minutes: 5}
images:
kernel:
url: "http://fileserver/Image.gz"
compression: gz
image_arg: -kernel {kernel} -append 'console=ttyAMA0,38400n8'
initrd:
url: "http://fileserver/alpine-base-latest.cpio.zst"
image_arg: -initrd {initrd}
- boot:
method: qemu
timeout: {minutes: 5}
auto_login:
login_prompt: "login:"
username: "root"
prompts: ["([a-zA-Z0-9@]*):[/~]#"]
- test:
timeout:
minutes: 15
definitions:
- name: wget-smoke
repository: https://git.codelinaro.org/linaro/training/test-definitions.git
from: git
path: lva02-lava_for_users-part_2/wget-smoke/wget-smoke.yaml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment