2013-03-26 09:21:32 +00:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2013-03-26 09:49:08 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
|
2013-03-26 09:21:32 +00:00
|
|
|
#include "test_runner.h"
|
|
|
|
|
|
|
|
#include <library.h>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
SRunner *sr;
|
|
|
|
int nf;
|
|
|
|
|
2013-06-04 14:25:22 +00:00
|
|
|
/* test cases are forked and there is no cleanup, so disable leak detective.
|
|
|
|
* can be enabled for individual tests with leak_detective_t.set_state */
|
2013-03-26 09:21:32 +00:00
|
|
|
setenv("LEAK_DETECTIVE_DISABLE", "1", 1);
|
2013-03-26 09:49:08 +00:00
|
|
|
/* redirect all output to stderr (to redirect make's stdout to /dev/null) */
|
|
|
|
dup2(2, 1);
|
2013-03-26 09:21:32 +00:00
|
|
|
|
|
|
|
library_init(NULL);
|
|
|
|
|
|
|
|
sr = srunner_create(NULL);
|
2013-06-04 14:25:22 +00:00
|
|
|
srunner_add_suite(sr, bio_reader_suite_create());
|
2013-03-26 15:39:44 +00:00
|
|
|
srunner_add_suite(sr, chunk_suite_create());
|
2013-06-03 16:58:14 +00:00
|
|
|
srunner_add_suite(sr, enum_suite_create());
|
2013-03-26 09:41:54 +00:00
|
|
|
srunner_add_suite(sr, enumerator_suite_create());
|
2013-03-26 11:18:44 +00:00
|
|
|
srunner_add_suite(sr, linked_list_suite_create());
|
2013-03-26 12:07:23 +00:00
|
|
|
srunner_add_suite(sr, linked_list_enumerator_suite_create());
|
2013-03-26 15:38:27 +00:00
|
|
|
srunner_add_suite(sr, hashtable_suite_create());
|
2013-03-26 13:52:33 +00:00
|
|
|
srunner_add_suite(sr, identification_suite_create());
|
2013-03-27 08:16:59 +00:00
|
|
|
srunner_add_suite(sr, threading_suite_create());
|
2013-03-27 15:35:28 +00:00
|
|
|
srunner_add_suite(sr, utils_suite_create());
|
2013-03-26 09:21:32 +00:00
|
|
|
|
|
|
|
srunner_run_all(sr, CK_NORMAL);
|
|
|
|
nf = srunner_ntests_failed(sr);
|
|
|
|
|
|
|
|
srunner_free(sr);
|
|
|
|
library_deinit();
|
|
|
|
|
|
|
|
return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
|
|
|
}
|