File: run-tests

package info (click to toggle)
fsvs 1.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,964 kB
  • ctags: 1,464
  • sloc: ansic: 16,650; sh: 5,885; perl: 783; makefile: 338; python: 90
file content (40 lines) | stat: -rwxr-xr-x 776 bytes parent folder | download | duplicates (3)
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
35
36
37
38
39
40
#!/bin/bash

set -e 

anyfail=0
. ./test_functions

if [[ "$LC_ALL" != "" ]]
then
	$ERROR_NB "Using LC_ALL overrides the needed LC_MESSAGES setting."
	$ERROR "Please use LANG instead."
fi

for test in $TEST_LIST
do
	echo "" 
	tput setaf 4 || true 
	echo "_______________________________________________________" 
	echo "  \"$test\":1: ("`date`")"`tput op` 
	script=`pwd`/$test 
	if ! ( cd $TESTBASE && CURRENT_TEST=$test bash $BASH_VERBOSE $script 2>&1 )
	then
		echo "----++---- $script failed ----++----" 

		if [[ -z "$TEST_FAIL_WRITE_HDL" ]]
		then 
			exit 1 
		else
			if [[ "$anyfail" == 0 && -n "$TEST_TTY_HDL" ]]
			then 
				$ERROR_NB "First failed test is $test" > $TEST_TTY_HDL
			fi
			anyfail=1
			echo $test > $TEST_FAIL_WRITE_HDL
		fi
	fi
done

exit $anyfail