src/libstrongswan/plugins/gcm/Makefile
src/libstrongswan/plugins/af_alg/Makefile
src/libstrongswan/plugins/test_vectors/Makefile
+ src/libstrongswan/tests/Makefile
src/libhydra/Makefile
src/libhydra/plugins/attr/Makefile
src/libhydra/plugins/attr_sql/Makefile
libstrongswan_la_LIBADD += plugins/test_vectors/libstrongswan-test-vectors.la
endif
endif
+
+if UNITTESTS
+if MONOLITHIC
+ SUBDIRS += .
+endif
+ SUBDIRS += tests
+endif
--- /dev/null
+test_runner
--- /dev/null
+TESTS = test_runner
+
+check_PROGRAMS = $(TESTS)
+
+test_runner_SOURCES = \
+ test_runner.c test_runner.h
+
+
+test_runner_CFLAGS = \
+ -I$(top_srcdir)/src/libstrongswan \
+ @CHECK_CFLAGS@
+
+test_runner_LDADD = \
+ $(top_builddir)/src/libstrongswan/libstrongswan.la \
+ @CHECK_LIBS@
--- /dev/null
+/*
+ * Copyright (C) 2013 Tobias Brunner
+ * Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#include "test_runner.h"
+
+#include <library.h>
+
+int main()
+{
+ SRunner *sr;
+ int nf;
+
+ /* if a test fails there is no cleanup, so disable leak detective */
+ setenv("LEAK_DETECTIVE_DISABLE", "1", 1);
+
+ library_init(NULL);
+
+ sr = srunner_create(NULL);
+
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+
+ srunner_free(sr);
+ library_deinit();
+
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
--- /dev/null
+/*
+ * Copyright (C) 2013 Tobias Brunner
+ * Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#ifndef TEST_RUNNER_H_
+#define TEST_RUNNER_H_
+
+#include <check.h>
+
+#endif /** TEST_RUNNER_H_ */