Initialize TKM client library in tkm.c

This commit is contained in:
Reto Buerki
2013-03-19 15:23:45 +01:00
committed by Tobias Brunner
parent 559fe48c50
commit 3d2746309e
3 changed files with 37 additions and 6 deletions
+8 -2
View File
@@ -14,12 +14,17 @@
* for more details.
*/
#include <stdlib.h>
#include "tkm.h"
#include "test_runner.h"
int main(void)
{
if (!tkm_init())
{
fprintf(stderr, "Could not connect to TKM, aborting tests\n");
return EXIT_FAILURE;
}
int number_failed;
Suite *s = suite_create("TKM tests");
suite_add_tcase(s, make_id_manager_tests());
@@ -30,6 +35,7 @@ int main(void)
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
tkm_deinit();
srunner_free(sr);
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;