opnsense-src/contrib/libxo/tests/core/Makefile.am
Phil Shafer 42ff34c310 Import to 0.6.1
0.5.0:
    document "trim" modifier
    add xo_emit_field functions
    Add xo_set_file{,_h} functions
    Fix LIBXO_* variables; add -L and -I as needed
    add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
    fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
    flush after transitions; fix flush call in xo_do_emit
    mkdir the version-specific packaging dir
    use "XO_" instead of LIBXO_

  0.6.0:
    Add --with-retain-size to set the size (in bits) of the retain hash buckets
    Add The Argument Modifier ({a:})
    Add retain and no-retain to --libxo
    autoconf: Add test for monitor.h
    Document quote heuristic
    go deep with nroff backslashes
    Use "ULL" for 32 bit check
    add xo_retain_clear and xo_retain_clear_all
    docs: combine two 'handles' section; move command line argument section
    handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
    make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
    new xo_emit_f functions
    nuke some unused UNUSEDs
    test code: path must be static
    update test cases

  0.6.1:
    fix version number (missed a commit during new-release)

Reviewed by:	sjg
Approved by:	sjg (mentor)
2016-04-15 18:46:15 +00:00

131 lines
3.5 KiB
Makefile

#
# $Id$
#
# Copyright 2014, Juniper Networks, Inc.
# All rights reserved.
# This SOFTWARE is licensed under the LICENSE provided in the
# ../Copyright file. By downloading, installing, copying, or otherwise
# using the SOFTWARE, you agree to be bound by the terms of that
# LICENSE.
AM_CFLAGS = -I${top_srcdir} -I${top_srcdir}/libxo
# Ick: maintained by hand!
TEST_CASES = \
test_01.c \
test_02.c \
test_03.c \
test_04.c \
test_05.c \
test_06.c \
test_07.c \
test_08.c \
test_09.c \
test_10.c \
test_11.c \
test_12.c
test_01_test_SOURCES = test_01.c
test_02_test_SOURCES = test_02.c
test_03_test_SOURCES = test_03.c
test_04_test_SOURCES = test_04.c
test_05_test_SOURCES = test_05.c
test_06_test_SOURCES = test_06.c
test_07_test_SOURCES = test_07.c
test_08_test_SOURCES = test_08.c
test_09_test_SOURCES = test_09.c
test_10_test_SOURCES = test_10.c
test_11_test_SOURCES = test_11.c
test_12_test_SOURCES = test_12.c
# TEST_CASES := $(shell cd ${srcdir} ; echo *.c )
noinst_PROGRAMS = ${TEST_CASES:.c=.test}
LDADD = \
${top_builddir}/libxo/libxo.la
if HAVE_HUMANIZE_NUMBER
LDADD += -lutil
endif
EXTRA_DIST = \
${TEST_CASES} \
${addprefix saved/, ${TEST_CASES:.c=.T.err}} \
${addprefix saved/, ${TEST_CASES:.c=.T.out}} \
${addprefix saved/, ${TEST_CASES:.c=.XP.err}} \
${addprefix saved/, ${TEST_CASES:.c=.XP.out}} \
${addprefix saved/, ${TEST_CASES:.c=.JP.err}} \
${addprefix saved/, ${TEST_CASES:.c=.JP.out}} \
${addprefix saved/, ${TEST_CASES:.c=.HP.err}} \
${addprefix saved/, ${TEST_CASES:.c=.HP.out}} \
${addprefix saved/, ${TEST_CASES:.c=.X.err}} \
${addprefix saved/, ${TEST_CASES:.c=.X.out}} \
${addprefix saved/, ${TEST_CASES:.c=.J.err}} \
${addprefix saved/, ${TEST_CASES:.c=.J.out}} \
${addprefix saved/, ${TEST_CASES:.c=.H.err}} \
${addprefix saved/, ${TEST_CASES:.c=.H.out}} \
${addprefix saved/, ${TEST_CASES:.c=.HIPx.err}} \
${addprefix saved/, ${TEST_CASES:.c=.HIPx.out}}
S2O = | ${SED} '1,/@@/d'
all:
valgrind:
@echo '## Running the regression tests under Valgrind'
${MAKE} CHECKER='valgrind -q' tests
#TEST_TRACE = set -x ;
TEST_JIG = \
${CHECKER} ./$$base.test ${TEST_OPTS} \
> out/$$base.$$fmt.out 2> out/$$base.$$fmt.err ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.out out/$$base.$$fmt.out ${S2O} ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.err out/$$base.$$fmt.err ${S2O}
TEST_ONE = \
LIBXO_OPTIONS=:W$$fmt ${TEST_JIG}
TEST_TWO = \
LIBXO_OPTIONS=warn,encoder=test ${TEST_JIG}
TEST_FORMATS = T XP JP HP X J H HIPx
test tests: ${bin_PROGRAMS}
@${MKDIR} -p out
-@ ${TEST_TRACE} (for test in ${TEST_CASES} ; do \
base=`${BASENAME} $$test .c` ; \
(for fmt in ${TEST_FORMATS}; do \
echo "... $$test ... $$fmt ..."; \
${TEST_ONE}; \
true; \
done) ; \
(for fmt in E; do \
echo "... $$test ... $$fmt ..."; \
${TEST_TWO}; \
true; \
done) \
done)
one:
-@(test=${TEST_CASE}; data=${TEST_DATA}; ${TEST_ONE} ; true)
accept:
-@(for test in ${TEST_CASES} ; do \
base=`${BASENAME} $$test .c` ; \
(for fmt in ${TEST_FORMATS} E; do \
echo "... $$test ... $$fmt ..."; \
${CP} out/$$base.$$fmt.out ${srcdir}/saved/$$base.$$fmt.out ; \
${CP} out/$$base.$$fmt.err ${srcdir}/saved/$$base.$$fmt.err ; \
done) \
done)
.c.test:
$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ $<
CLEANFILES = ${TEST_CASES:.c=.test}
CLEANDIRS = out
clean-local:
rm -rf ${CLEANDIRS}