lib/src_postinst.cygpart: use DWARF_PARSE optionally instead of objdump -dl
[cygport/rpm-style.git] / testsuite / vars
blob344ba560b752a1e1cdbe38f33aa5eca025a0d5ae
1 #!/bin/bash
2 set -e
4 cd ${top_srcdir}/testsuite/
5 for c in $(find . -name \*.cygport -not -path './logic/*')
6 do
7 test=$(dirname ${c})
8 cygport=$(basename ${c})
10 test -d ${top_builddir}/testsuite/$test || mkdir -p ${top_builddir}/testsuite/$test
11 cd ${top_builddir}/testsuite/$test
12 cp -f ${top_srcdir}/testsuite/$test/$cygport $cygport
14 ${top_builddir}/bin/cygport-inplace $cygport vars ARCHES BUILD_REQUIRES CROSS_HOST INHERITED >vars
16 # compare results
17 if [ -a ${top_srcdir}/testsuite/$test/vars ];
18 then
19 diff -u ${top_srcdir}/testsuite/$test/vars vars || test_failed=1
20 else
21 # if CREATE_VARS is set, create the expected vars file for use in future testing
22 if [ -z ${CREATE_VARS+x} ]
23 then
24 echo "can't verify vars as expected vars ${top_srcdir}/testsuite/$test/vars not found." >&2
25 test_failed=1
26 else
27 cp vars ${top_srcdir}/testsuite/$test/vars
30 done
32 if [ -n "$test_failed" ]
33 then
34 exit 1