Add a metatest program
This program can be used to validate that things that should be detected as
test failures are indeed caught, either by setting the test result to
MBEDTLS_TEST_RESULT_FAILED or by aborting the program.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/programs/Makefile b/programs/Makefile
index 2d0f705..43ae99f 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -114,6 +114,7 @@
ssl/ssl_server$(EXEXT) \
ssl/ssl_server2$(EXEXT) \
test/benchmark$(EXEXT) \
+ test/metatest$(EXEXT) \
test/query_compile_time_config$(EXEXT) \
test/selftest$(EXEXT) \
test/udp_proxy$(EXEXT) \
@@ -349,6 +350,10 @@
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/dlopen.c $(LDFLAGS) $(DLOPEN_LDFLAGS) -o $@
endif
+test/metatest$(EXEXT): test/metatest.c $(DEP)
+ echo " CC test/metatest.c"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) test/metatest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+
test/query_config.o: test/query_config.c test/query_config.h $(DEP)
echo " CC test/query_config.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c test/query_config.c -o $@