From b8a8476a923c022c6be2b66fdddf2207fabf7bca Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 20 Nov 2016 02:50:49 -0500 Subject: [PATCH] add custom main() for criterion tests in order to initiatize huge pages --- tests/main.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/main.c diff --git a/tests/main.c b/tests/main.c new file mode 100644 index 000000000..370ba501f --- /dev/null +++ b/tests/main.c @@ -0,0 +1,26 @@ +/** Custom main() for Criterion + * + * @author Steffen Vogel + * @copyright 2014-2016, Institute for Automation of Complex Power Systems, EONERC + * This file is part of VILLASnode. All Rights Reserved. Proprietary and confidential. + * Unauthorized copying of this file, via any medium is strictly prohibited. + *********************************************************************************/ + +#include + +#include +#include + +int main(int argc, char *argv[]) { + struct criterion_test_set *tests = criterion_initialize(); + + info("Initialize memory system"); + memory_init(); + + int result = 0; + if (criterion_handle_args(argc, argv, true)) + result = !criterion_run_all_tests(tests); + + criterion_finalize(tests); + return result; +} \ No newline at end of file