File: run_tests.sh

package info (click to toggle)
qdl 2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 388 kB
  • sloc: ansic: 4,810; makefile: 87; xml: 75; sh: 70
file content (34 lines) | stat: -rwxr-xr-x 674 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause

set -e

SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
FLAT_BUILD_PATH=$SCRIPT_PATH/data

echo "####### Generate a FLAT build"
$FLAT_BUILD_PATH/generate_flat_build.sh

echo "####### Run QDL tests"
cd $SCRIPT_PATH
for t in test_*.sh; do
	echo "###### Run $t"
	bash $t
	if [ $? -eq 0 ]; then
		echo "####### Test $t: OK"
	else
		echo "####### Test $t: FAIL"
		failed=1
	fi
done

echo "####### Housekeeping"
rm -f ${FLAT_BUILD_PATH}/*.bin ${FLAT_BUILD_PATH}/*.img
rm -f ${FLAT_BUILD_PATH}/*.elf

if [ "$failed" == "1" ]; then
	echo "####### Some test failed"
	exit 1
fi

echo "####### All tests passed"