-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathtest-driver
executable file
·45 lines (36 loc) · 1.2 KB
/
test-driver
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
#!/bin/bash
set -e
shopt -s extglob
test=$1
case $test in
download/*) DISTDIR= ;;
*) DISTDIR=${top_srcdir}/testsuite/distdir ;;
esac
test -d ${top_builddir}/testsuite/$test || mkdir -p ${top_builddir}/testsuite/$test
cd ${top_builddir}/testsuite/$test
cp -f ${top_srcdir}/testsuite/$test/!(hints) .
DISTDIR=${DISTDIR} ${top_builddir}/bin/cygport-inplace *.cygport clean get all
# compare hints
for hint in $(find -name \*.hint)
do
if [ -a ${top_srcdir}/testsuite/$test/hints/$hint ];
then
diff -u ${top_srcdir}/testsuite/$test/hints/$hint $hint
else
# if CREATE_HINTS is set, create the expected hint file for use in future testing
if [ -z ${CREATE_HINTS+x} ]
then
echo "can't verify hint $hint, as expected hint ${top_srcdir}/testsuite/$test/hints/$hint not found." >&2
missing_hints=1
else
mkdir -p $(dirname ${top_srcdir}/testsuite/$test/hints/$hint)
cp $hint ${top_srcdir}/testsuite/$test/hints/$hint
fi
fi
done
if [ -n "$missing_hints" ]
then
exit 1
fi
# compare filelist
diff -u ${CASE_INSENSITIVE:+-i} ${top_srcdir}/testsuite/$test/*.list <(${top_builddir}/bin/cygport-inplace *.cygport list)