aboutsummaryrefslogtreecommitdiff
path: root/src/templating/run-original-tests.sh
blob: 8df0331fbe48f32f373841bec64adc4f436eea29 (plain)
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
#!/bin/bash
# This file is in the public domain.
set -eux

export CFLAGS="-g"

function build()
{
    echo "Ensuring clean state on exit ..."
    make clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-compile mostlyclean-libtool
    make
}

# Install rebuild-on-exit handler (except for kill -9)
trap build EXIT

echo "Ensuring clean state on entry to legacy tests ..."

make clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-compile mostlyclean-libtool

# The build fails if libjson-c-dev is not installed.
# That's OK, we don't otherwise need it and don't
# even bother testing for it in configure.ac.
# However, in that case, skip the test suite.
make -f mustach-original-Makefile mustach mustach-json-c.o || exit 77
make -f mustach-original-Makefile clean || true
make -f mustach-original-Makefile basic-tests
make -f mustach-original-Makefile clean || true

echo "Test done"

exit 0