summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Khandelwal <tushar.khandelwal@arm.com>2019-05-29 16:26:15 +0100
committerTushar Khandelwal <tushar.khandelwal@arm.com>2019-08-16 12:20:35 +0100
commita06517e5df8664656c29830734d52e2dc3ce0387 (patch)
tree6e9b774a546094fdf6da54df2d40d5b49b983dda
parent25c698eb99df401df56e1c30e7f24ae60c5362a7 (diff)
run model or unit tests using this top level scriptCORSTONE-700-19.02corstone700-19.02
Change-Id: I55340ae2b1f77d6f3724f1918f9eaec38fa90647 Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
-rw-r--r--readme.txt37
-rwxr-xr-xrun_model.sh45
2 files changed, 82 insertions, 0 deletions
diff --git a/readme.txt b/readme.txt
new file mode 100644
index 0000000..fac2e91
--- /dev/null
+++ b/readme.txt
@@ -0,0 +1,37 @@
+There are 3 ways of running tests using the run_model.sh file.
+
+1. ./run_model.sh <Fast Model executable path>
+
+ This will run the Corstone700 fast model and will allow user
+ to interact and run the tests manually.Once you get the linux
+ prompt by entering user as "root" you can run test-app manually.
+
+ Currently two test cases are supported
+ a. Test Boot Processor and Host MHU communication.
+ This test sends message from non secure channel MHU1
+ from linux userspace using rpmsg framework.
+ b. Test REFCLK timer
+ This test tests host peripheral access and routing its
+ interrupt to boot processor using interrupt router and
+ then sending it to Boot Processor NVIC using interrupt
+ collator.
+
+ Running the tests manually :
+ root# test-app <1/2>
+ 1 for MHU test
+ 2 for Timer test
+
+2. ./run_model.sh <Fast Model executable path> -u
+ With model windows and logs visible
+ This will pop up an interactive menu to run the automated
+ test suite for unit testing.In this mode it shows non interactive
+ model windows and logs for user to view and validate.
+
+3. ./run_model.sh <Fast Model executable path> -u
+ Runs in headless mode
+ This will pop up an interactive menu to run the automated
+ test suite for unit testing.In this mode all the logs and
+ test output and read without launching any model window
+ and running the test in headless mode.The latter one is good
+ to test in continuous integration setups.
+
diff --git a/run_model.sh b/run_model.sh
new file mode 100755
index 0000000..27e3dab
--- /dev/null
+++ b/run_model.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+# This proprietary software may be used only as authorised by a licensing
+# agreement from ARM Limited
+# (C) COPYRIGHT 2019 ARM Limited
+# The entire notice above must be reproduced on all authorised copies and
+# copies may only be made to the extent permitted by a licensing agreement from
+# ARM Limited.
+
+# Set your ARMLMD_LICENSE_FILE License path for FVP licenses before running this script
+
+# Get full absolute path to the directory of this file
+pushd $(dirname "$0")
+BASEDIR=$(pwd)
+popd
+OUTDIR=${BASEDIR}/../build-iota-tiny/tmp-iota_tiny/deploy/images/corstone700
+
+help() {
+ echo "usage: run_model.sh \${FVP executable path} [ -u ]"
+ echo " -u: Run unit test selector"
+ echo " No additional argument: load and execute model"
+ exit 1
+}
+
+# Ensure that an FVP path has been provided
+if [ -z "$1" ]
+then
+ help
+fi
+
+if [ -z "$2" ]
+then
+ echo "================== Launching Corstone700 Model ==============================="
+ $1 \
+ -C se.trustedBootROMloader.fname="${OUTDIR}/se_romfw.bin" \
+ -C board.flashloader0.fname="${OUTDIR}/iota-tiny-image-corstone700.wic"
+
+elif [ "$2" == "-u" ]
+then
+ # We assume that the FVP library model is identically named to the FVP executable.
+ python ${BASEDIR}/scripts/test/testselector.py \
+ --corstone700 "--image_dir ${OUTDIR} --fvp ${1}.so"
+else
+ help
+fi
+