File: run-testsuite

package info (click to toggle)
jose 14-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,884 kB
  • sloc: ansic: 10,235; javascript: 987; sh: 586; makefile: 9
file content (28 lines) | stat: -rwxr-xr-x 605 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
#!/bin/sh

set -e

CFLAGS="$(dpkg-buildflags --get CFLAGS)"
CPPFLAGS="$(dpkg-buildflags --get CPPFLAGS)"
LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"

cd tests

export VECTORS='vectors'
EXIT=0

for f in $(find . -maxdepth 1 -type f -executable | sort) ; do
    echo "Testing: $(basename "$f")"
    chronic "$f" || EXIT=1
done

for f in $(find . -maxdepth 1 -type f -name '*.c' | sort) ; do
    BN="$(basename "$f")"
    echo "Compiling: $BN"
    PROG="${BN%%.c}"
    cc $CFLAGS $CPPFLAGS $LDFLAGS "$f" -o "$PROG" -ljose -ljansson
    echo "Testing: $PROG"
    chronic "./$PROG" || EXIT=1
done

exit "$EXIT"