File: 060_components

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 (42 lines) | stat: -rwxr-xr-x 717 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
41
42
#!/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

(
  cd /
	$BINq urls file:///
)

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"