Remove example unit tests
PATCH 1/1 Remove example unit tests
We have plenty real unit test that can be used as examples, so the example tests are no longer needed. Let's get rid of them.
Signed-off-by Steffan Karger <[email protected]...>
--- tests/unit_tests/Makefile.am | 2 +- tests/unit_tests/example_test/Makefile.am | 13 -------- tests/unit_tests/example_test/README.md | 3 -- tests/unit_tests/example_test/test.c | 52 ------------------------------- tests/unit_tests/example_test/test2.c | 23 -------------- 5 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 tests/unit_tests/example_test/Makefile.am delete mode 100644 tests/unit_tests/example_test/README.md delete mode 100644 tests/unit_tests/example_test/test.c delete mode 100644 tests/unit_tests/example_test/test2.c
tests/unit_tests/Makefile.am +1 -1
@@ -1,5 +1,5 @@ AUTOMAKE_OPTIONS = foreign if CMOCKA_INITIALIZED -SUBDIRS = example_test openvpn plugins +SUBDIRS = openvpn plugins endif
tests/unit_tests/example_test/Makefile.am deleted +0 -13
@@ -1,13 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -check_PROGRAMS = example_testdriver example2_testdriver - -TESTS = $(check_PROGRAMS) - -example_testdriver_CFLAGS = @TEST_CFLAGS@ -example_testdriver_LDFLAGS = @TEST_LDFLAGS@ -example_testdriver_SOURCES = test.c - -example2_testdriver_CFLAGS = @TEST_CFLAGS@ -example2_testdriver_LDFLAGS = @TEST_LDFLAGS@ -example2_testdriver_SOURCES = test2.c
tests/unit_tests/example_test/README.md deleted +0 -3
@@ -1,3 +0,0 @@ -This test only checks that test compilation works. This example contains two test executables. - -These tests can be used as template for 'real' tests.
tests/unit_tests/example_test/test.c deleted +0 -52
52 lines not on this page · raw message
tests/unit_tests/example_test/test2.c deleted +0 -23
@@ -1,23 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <setjmp.h> -#include <cmocka.h> - - -static void -test_true (void **state) { - (void ) state; -} - - -int -main (void ) { -const struct CMUnitTest tests[] = { -cmocka_unit_test (test_true), - }; - -return cmocka_run_group_tests_name ("success_test2" , tests,NULL ,NULL ); -}
Signature · 1 line
2.7.4
Hi,
[ Talking to myself here... ]
Quoted 2 lines · Steffan Karger
We have plenty real unit test that can be used as examples, so the example tests are no longer needed. Let's get rid of them.
NAK. The patch is wrong because it leaves around a trace of the example tests in configure.ac, doesn't update the README in tests/unit_tests/ and the examples actually still are useful as a template.
So on second thought I think it's better to just leave them in.
-Steffan