From eef7e8aac587dd7bd710dca82b60f9190520334a Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Mon, 17 Dec 2018 18:43:22 -0800 Subject: Add a very simple regression script This runs all our examples (ie, "hello") on all our targets (ie, e31 and s51). It's very simple, but it should at least ensure we can avoid screwing anything up for now. Signed-off-by: Palmer Dabbelt --- scripts/coreip-rtl-regression.bash | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 scripts/coreip-rtl-regression.bash (limited to 'scripts') diff --git a/scripts/coreip-rtl-regression.bash b/scripts/coreip-rtl-regression.bash new file mode 100755 index 0000000..2c313dd --- /dev/null +++ b/scripts/coreip-rtl-regression.bash @@ -0,0 +1,43 @@ +#!/bin/bash + +set -e +set -o pipefail +set -x + +boards=() +boards+=("coreip-e31") +boards+=("coreip-s51") + +programs=() +programs+=("hello") + +for board in "${boards[@]}" +do + # This avoids a multidimmensional associtave array, which bash doesn't + # appear to enjoy. + releases=() + case "$board" + in + "coreip-e31") releases=("sifive_coreip_E31_AHB_rtl_full_v3p0_rc1") ;; + "coreip-s51") releases=("sifive_coreip_E51_TL_rtl_full_v3p0_rc0") ;; + *) echo "$0: unknown board $board"; exit 1;; + esac + + for release in "${releases}" + do + coreip_wdir="$(echo "$release" | cut -d_ -f1-6)" + coreip_tdir="$(echo "$release" | cut -d_ -f1-7)" + coreip_tar="/work/coreplex/${coreip_wdir}/${release}/${coreip_tdir}.tar.gz" + + for program in "${programs[@]}" + do + make BSP=mee BOARD="${board}" PROGRAM="${program}" clean + make BSP=mee BOARD="${board}" PROGRAM="${program}" software + rm -rf "${coreip_dir}" + tar -xvzpf "${coreip_tar}" + mkdir -p "${coreip_tdir}"/tests/"${program}" + cp software/"${program}"/"${program}".hex "${coreip_tdir}"/tests/"${program}"/program.hex + make -C "${coreip_tdir}" "${program}".out + done + done +done -- cgit v1.2.3