File: 060_components

package info (click to toggle)
fsvs 1.1.16-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,344 kB
  • ctags: 1,133
  • sloc: ansic: 14,472; sh: 6,793; perl: 631; makefile: 337
file content (37 lines) | stat: -rwxr-xr-x 684 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
35
36
37
#!/bin/bash

set -e 
$PREPARE_DEFAULT > /dev/null
$INCLUDE_FUNCS
cd $WC

logfile=$LOGDIR/060.comp-tests 

if [[ "$opt_DEBUG" != 1 ]]
then
	$INFO "No debugging compiled in, cannot do componenttests."
	exit 0
fi

# test for matching
if $COMPONENT_SCRIPT $logfile $TEST_PROG_DIR/comp-test/fail-test.ct > /dev/null 2>&1
then
	$ERROR "Component-test doesn't fail when it should!"
else
	$SUCCESS "Component-tests running"
fi

base=$TEST_PROG_DIR/comp-test
for scr in `cd $base && ls ???_*.ct`
do
	echo "testing $scr"
	if $COMPONENT_SCRIPT $logfile $base/$scr 
	then
	  $INFO "$scr ok"
	else
		echo "$base/$scr:1: unexpected answer"
	  $ERROR "Component-test failed"
	fi
done

$SUCCESS "ok"