blob: dafdf5395434e3303891636002a399d43908da80 [file] [log] [blame]
Raef Colesb3d343b2020-12-08 09:31:43 +00001#!/usr/bin/env bash
2# Copyright (c) 2021, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5
6usage()
7{
8 echo "$0 [-s source_dir] [-d build_dir] [-b <build_type>] [-c <compiler>] [-f <fih_profile>] [-l <tfm_level>]"
9}
10
11# Parse arguments
12while test $# -gt 0; do
13 case $1 in
14 -s|--source_dir)
15 SOURCE_DIR="$2"
16 shift
17 shift
18 ;;
19 -d|--build_dir)
20 BUILD_DIR="$2"
21 shift
22 shift
23 ;;
24 -b|--build_type)
25 BUILD_TYPE="$2"
26 shift
27 shift
28 ;;
29 -c|--compiler)
30 COMPILER="$2"
31 shift
32 shift
33 ;;
34 -f|--fih_profile)
35 FIH_PROFILE="$2"
36 shift
37 shift
38 ;;
39 -l|--tfm_level)
40 TFM_LEVEL="$2"
41 shift
42 shift
43 ;;
44 -h|--help)
45 usage
46 exit 0
47 ;;
48 *)
49 echo "Invalid argument"
50 usage
51 exit 1
52 ;;
53 esac
54done
55
56SCRIPT_DIR=$(dirname $(realpath "${BASH_SOURCE[0]}"))
57source ${SCRIPT_DIR}/util.sh
58
59TEST_DIR=$(realpath $(pwd))
60set_default SOURCE_DIR $(realpath ${TEST_DIR}/..)
61
62source ${SCRIPT_DIR}/fih_test_build_tfm.sh
63source ${SCRIPT_DIR}/fih_test_make_manifest.sh
64source ${SCRIPT_DIR}/fih_test_run_gdb.sh