Build and run libexpat regress tests from src/lib/libexpat/tests.
authorbluhm <bluhm@openbsd.org>
Fri, 30 Jun 2017 14:56:08 +0000 (14:56 +0000)
committerbluhm <bluhm@openbsd.org>
Fri, 30 Jun 2017 14:56:08 +0000 (14:56 +0000)
regress/lib/libexpat/Makefile [new file with mode: 0644]
regress/lib/libexpat/Makefile.inc [new file with mode: 0644]
regress/lib/libexpat/benchmark/Makefile [new file with mode: 0644]
regress/lib/libexpat/runtests/Makefile [new file with mode: 0644]
regress/lib/libexpat/runtestspp/Makefile [new file with mode: 0644]

diff --git a/regress/lib/libexpat/Makefile b/regress/lib/libexpat/Makefile
new file mode 100644 (file)
index 0000000..16614df
--- /dev/null
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2017/06/30 14:56:08 bluhm Exp $
+
+SUBDIR=        runtests runtestspp benchmark
+
+.include <bsd.subdir.mk>
diff --git a/regress/lib/libexpat/Makefile.inc b/regress/lib/libexpat/Makefile.inc
new file mode 100644 (file)
index 0000000..cc8d1ae
--- /dev/null
@@ -0,0 +1,10 @@
+# $OpenBSD: Makefile.inc,v 1.1.1.1 2017/06/30 14:56:08 bluhm Exp $
+
+EXPATDIR=      ${.CURDIR}/../../../../lib/libexpat
+.PATH:         ${EXPATDIR}/tests ${EXPATDIR}/tests/benchmark
+PROG=          ${.CURDIR:T}
+CFLAGS=                -g -I${EXPATDIR}/lib
+CPPFLAGS=      -g -I${EXPATDIR}/lib
+LDFLAGS=       -g -static
+LDADD=         -lexpat
+DPADD=         ${LIBEXPAT}
diff --git a/regress/lib/libexpat/benchmark/Makefile b/regress/lib/libexpat/benchmark/Makefile
new file mode 100644 (file)
index 0000000..620303e
--- /dev/null
@@ -0,0 +1,9 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2017/06/30 14:56:08 bluhm Exp $
+
+# take any large xml file located in our source tree
+XMLFILE?=      ${BSDSRCDIR}/gnu/lib/libstdc++/libstdc++/docs/html/17_intro/porting-howto.xml
+
+run-regress-benchmark: ${PROG}
+       time ./${PROG} ${XMLFILE} 65535 10000
+
+.include <bsd.regress.mk>
diff --git a/regress/lib/libexpat/runtests/Makefile b/regress/lib/libexpat/runtests/Makefile
new file mode 100644 (file)
index 0000000..bc37ec0
--- /dev/null
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2017/06/30 14:56:08 bluhm Exp $
+
+SRCS=          runtests.c chardata.c memcheck.c minicheck.c
+
+.include <bsd.regress.mk>
diff --git a/regress/lib/libexpat/runtestspp/Makefile b/regress/lib/libexpat/runtestspp/Makefile
new file mode 100644 (file)
index 0000000..9baae15
--- /dev/null
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2017/06/30 14:56:08 bluhm Exp $
+
+SRCS=          runtestspp.cpp chardata.c memcheck.c minicheck.c
+
+.include <bsd.regress.mk>