File: syntax

package info (click to toggle)
pspp 0.3.0-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,288 kB
  • ctags: 4,679
  • sloc: ansic: 57,209; sh: 2,874; makefile: 405; sed: 93; perl: 18
file content (51 lines) | stat: -rwxr-xr-x 900 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
43
44
45
46
47
48
49
50
51
#! /bin/sh
set -e
RESULT=pass

srcdir=${srcdir:-.}
for x in `cd $srcdir; echo *.stat *.data`; do 
    if [ ! -e $x ]; then
	ln -s $srcdir/$x .
    fi
done

rm -f *.actual
if [ -z "$BENCHMARK" ]; then
    for x in *.stat; do
	echo -n "$x ... "
	../src/pspp --testing-mode $x >$x.actual
	if [ -f $srcdir/expect/$x ]; then
	    if diff -u $srcdir/expect/$x $x.actual; then 
		echo "pass"; rm $x.actual
	    else 
		echo "FAIL"; RESULT=fail
	    fi
	else
	    if [ -s $x.actual ]; then 
		echo "FAIL"; RESULT=fail
	    else 
		echo "pass"; rm $x.actual
	    fi
	fi
    done
else
    mkdir benchmark || true
    rm -f benchmark/*
    for x in *.stat; do
	echo -n "$x ... "
	../src/pspp --testing-mode $x > benchmark/$x
	if [ ! -s benchmark/$x ]; then
	    rm benchmark/$x
	fi
	echo
    done
fi

for x in *.stat *.data; do
    if [ -h $x ]; then
	rm $x
    fi
done

if [ $RESULT = fail ]; then exit 1; fi