[master] cdca08cb1 build: Always build vxp_test

Nils Goroll nils.goroll at uplex.de
Thu Jun 10 08:35:09 UTC 2021


commit cdca08cb19bf591529e55dcf82491d1e7feba455
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue May 18 07:48:33 2021 +0200

    build: Always build vxp_test
    
    To make sure it is always readily available without an extra step, and
    that it doesn't rot away missing build flags or triggerring developer
    warnings like GCC's -Wtautological-constant-out-of-range-compare.

diff --git a/.gitignore b/.gitignore
index 7dba66a9f..f7aae9ebd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -123,6 +123,7 @@ cscope.*out
 /lib/libvarnish/vsb_test
 /lib/libvarnishapi/vsl_glob_test
 /lib/libvarnishapi/vsl_glob_test_coverage
+/lib/libvarnishapi/vxp_test
 
 # vtc-bisect.sh default vtc
 /bisect.vtc
diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am
index 26638491b..15f8a208c 100644
--- a/lib/libvarnishapi/Makefile.am
+++ b/lib/libvarnishapi/Makefile.am
@@ -72,17 +72,18 @@ vxp_tokens.h: \
 	$(srcdir)/generate.py
 	@PYTHON@ $(srcdir)/generate.py $(srcdir) $(top_builddir)
 
-EXTRA_PROGRAMS = vxp_test
+noinst_PROGRAMS += vxp_test
 
 vxp_test_SOURCES = \
 	$(libvarnishapi_la_SOURCES) \
 	vxp_test.c
 vxp_test_CFLAGS = \
 	-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' \
-	-DVXP_DEBUG
+	-DVXP_DEBUG \
+	${SAN_CFLAGS}
 vxp_test_LDADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
-	${RT_LIBS} ${LIBM} ${PTHREAD_LIBS}
+	${RT_LIBS} ${LIBM} ${PTHREAD_LIBS} ${SAN_LDFLAGS}
 
 TESTS = vsl_glob_test
 
diff --git a/lib/libvarnishapi/vxp_test.c b/lib/libvarnishapi/vxp_test.c
index 359902025..9f921c9a9 100644
--- a/lib/libvarnishapi/vxp_test.c
+++ b/lib/libvarnishapi/vxp_test.c
@@ -58,7 +58,7 @@ main(int argc, char * const *argv)
 	struct vsb *vsb;
 	struct vex *vex;
 	char *q_arg = NULL;
-	char opt;
+	int opt;
 
 	while ((opt = getopt(argc, argv, "q:")) != -1) {
 		switch (opt) {


More information about the varnish-commit mailing list