aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon-tkm/tests/test_runner.c
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-05-18 14:09:24 +0200
committerTobias Brunner <tobias@strongswan.org>2013-03-19 15:23:45 +0100
commit559fe48c5040788c5d8135f00905afb16e5ccaf7 (patch)
treedce9886c360bd9f342b72386a7d94a834f603032 /src/charon-tkm/tests/test_runner.c
parent4dc3ef94a1b697c64bfc714bb129a5a5d0e1873c (diff)
downloadstrongswan-559fe48c5040788c5d8135f00905afb16e5ccaf7.tar.bz2
strongswan-559fe48c5040788c5d8135f00905afb16e5ccaf7.tar.xz
Introduce TKM specific charon daemon (charon-tkm)
Analogous to charon-nm the charon-tkm daemon is a specialized charon instance used in combination with the trusted key manager (TKM) written in Ada. The charon-tkm is basically a copy of the charon-nm code which will register it's own TKM specific plugins. The daemon binary is built using the gprbuild utility. This is needed because it uses the tkm-rpc Ada library and consequently the Ada runtime. gprbuild takes care of the complete binding and linker steps required to properly initialize the Ada runtime.
Diffstat (limited to 'src/charon-tkm/tests/test_runner.c')
-rw-r--r--src/charon-tkm/tests/test_runner.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/charon-tkm/tests/test_runner.c b/src/charon-tkm/tests/test_runner.c
new file mode 100644
index 000000000..61c252416
--- /dev/null
+++ b/src/charon-tkm/tests/test_runner.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 Reto Buerki
+ * Copyright (C) 2012 Adrian-Ken Rueegsegger
+ * 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 <stdlib.h>
+
+#include "test_runner.h"
+
+int main(void)
+{
+ int number_failed;
+ Suite *s = suite_create("TKM tests");
+ suite_add_tcase(s, make_id_manager_tests());
+ suite_add_tcase(s, make_nonceg_tests());
+
+ SRunner *sr = srunner_create(s);
+
+ srunner_run_all(sr, CK_NORMAL);
+ number_failed = srunner_ntests_failed(sr);
+
+ srunner_free(sr);
+
+ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}