summaryrefslogtreecommitdiff
path: root/ubuntu
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2014-04-28 15:33:02 +0100
committerAlex Bennée <alex.bennee@linaro.org>2017-07-24 12:39:14 +0100
commit9f9be35248214dd34389ead0dd9223910cb5d129 (patch)
tree6b44d85fb4f25f9a9317e879f44cc35809162d4c /ubuntu
parent8db3a012ea1afe89a81a68cb18cb7bcafd194142 (diff)
new: qemu risu instruction testing.
This adds a simple instruction test based on risu. It downloads a pre-built RISU bundle and runs each binary with a corresponding trace file as a individual QEMU test. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Change-Id: I26caf1a6c128fab9da582cc7b18b597566ea13f2 --- v2 - ensure we have dirs to work in v3 - reverse the sense of the run (use --master to validate) - move tarball to more stable testcases subdir
Diffstat (limited to 'ubuntu')
-rw-r--r--ubuntu/risu.yaml31
-rwxr-xr-xubuntu/scripts/run-risu.sh58
2 files changed, 89 insertions, 0 deletions
diff --git a/ubuntu/risu.yaml b/ubuntu/risu.yaml
new file mode 100644
index 0000000..e117b3b
--- /dev/null
+++ b/ubuntu/risu.yaml
@@ -0,0 +1,31 @@
+metadata:
+ name: risu
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Run RISU Instruction tests"
+ maintainer:
+ - alex.bennee@linaro.org
+ os:
+ - ubuntu
+ - debian
+ scope:
+ - functional
+ devices:
+ - kvm
+ - x86
+
+params:
+ # Modify chroot if you want to run inside a QEMU world after setting
+ # up a chroot with install-qemu-chroot.yaml
+ CHROOT: /home/chroot/
+ RISU_TARBALL: http://people.linaro.org/~alex.bennee/testcases/arm64.risu/risu.tar.bz2
+
+install:
+ steps:
+ - mkdir -p ${CHROOT}/risu
+ - cd ${CHROOT}
+ - wget -O risu.tar ${RISU_TARBALL}
+ - tar -xvf risu.tar --strip-components=1 -C ${CHROOT}/risu
+
+run:
+ steps:
+ - ubuntu/scripts/run-risu.sh ${CHROOT}/risu testcases.aarch64
diff --git a/ubuntu/scripts/run-risu.sh b/ubuntu/scripts/run-risu.sh
new file mode 100755
index 0000000..a889c2b
--- /dev/null
+++ b/ubuntu/scripts/run-risu.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Run a set of risu tests, recording their results in LAVA
+#
+#set -x
+set -e
+
+# Print out some simple usage instructions
+usage() {
+ echo "Usage: `basename $0` RISU_BASE TEST_DIRECTORY"
+ echo ""
+ echo "This script is used to run a set of RISU tests."
+ exit 1
+}
+
+while getopts "hr:" opt
+do
+ case $opt in
+ h)
+ usage
+ ;;
+ *)
+ echo "Unknown option."
+ usage
+ ;;
+ esac
+done
+
+shift $(( $OPTIND -1 ))
+
+RISU_BASE=$1
+RISU_TESTS=$2
+
+cd ${RISU_BASE}
+
+if [ ! -x ${RISU_BASE}/risu ]; then
+ echo "Couldn't find RISU binary"
+ exit 1
+fi
+
+if [ ! -d ${RISU_BASE}/${RISU_TESTS} ]; then
+ echo "No test directory specified"
+ exit 1
+fi
+
+for binary_file in ${RISU_BASE}/${RISU_TESTS}/*.risu.bin; do
+ basename=${binary_file##*/}
+ test_name=${basename%.risu.bin}
+ trace_file=${binary_file}.trace
+ if [ ! -e ${trace_file} ]; then
+ echo "Skipping test: ${test_name} as missing trace file"
+ else
+ echo "Running test: ${test_name}"
+ lava-test-case risu-${test_name} --shell ${RISU_BASE}/risu --master ${binary_file} --trace=${trace_file}
+ fi
+done
+
+exit 0