lib/src_postinst.cygpart: use DWARF_PARSE optionally instead of objdump -dl
[cygport/rpm-style.git] / testsuite / test-driver
blobef1dc9d08486bdc552b3ae97c5098b68e3359289
1 #!/bin/bash
3 set -e
4 shopt -s extglob
6 test=$1
8 case $test in
9 download/*) DISTDIR= ;;
10 *) DISTDIR=${top_srcdir}/testsuite/distdir ;;
11 esac
13 test -d ${top_builddir}/testsuite/$test || mkdir -p ${top_builddir}/testsuite/$test
14 cd ${top_builddir}/testsuite/$test
16 cp -f ${top_srcdir}/testsuite/$test/!(hints) .
18 DISTDIR=${DISTDIR} ${top_builddir}/bin/cygport-inplace *.cygport clean get all
20 # compare hints
21 for hint in $(find -name \*.hint)
23 if [ -a ${top_srcdir}/testsuite/$test/hints/$hint ];
24 then
25 diff -u ${top_srcdir}/testsuite/$test/hints/$hint $hint
26 else
27 # if CREATE_HINTS is set, create the expected hint file for use in future testing
28 if [ -z ${CREATE_HINTS+x} ]
29 then
30 echo "can't verify hint $hint, as expected hint ${top_srcdir}/testsuite/$test/hints/$hint not found." >&2
31 missing_hints=1
32 else
33 mkdir -p $(dirname ${top_srcdir}/testsuite/$test/hints/$hint)
34 cp $hint ${top_srcdir}/testsuite/$test/hints/$hint
37 done
39 if [ -n "$missing_hints" ]
40 then
41 exit 1
44 # compare filelist
45 diff -u ${CASE_INSENSITIVE:+-i} ${top_srcdir}/testsuite/$test/*.list <(${top_builddir}/bin/cygport-inplace *.cygport list)