From 6ce7e14cda86d4c817ba359f3bba8b05cc98fc3a Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 25 Oct 2022 09:03:19 -0700 Subject: [PATCH] Test Tools 1. Remove the flag NO_MAIN_FUNCTION from the test tools. 2. For unit and api tests, follow the patter for the testsuite with its NO_TESTSUITE_MAIN_DRIVER check. --- tests/api.c | 2 +- tests/testsuite.c | 4 ++-- tests/unit.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api.c b/tests/api.c index e5725b1f..4e990421 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1067,7 +1067,7 @@ int wolfSSH_ApiTest(int argc, char** argv) } -#ifndef NO_MAIN_FUNCTION +#ifndef NO_APITEST_MAIN_DRIVER int main(int argc, char** argv) { return wolfSSH_ApiTest(argc, argv); diff --git a/tests/testsuite.c b/tests/testsuite.c index f8d4c674..762cb995 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -47,7 +47,7 @@ #include "tests/sftp.h" #endif -#if !defined(NO_TESTSUITE_MAIN_DRIVER) && !defined(NO_MAIN_FUNCTION) +#ifndef NO_TESTSUITE_MAIN_DRIVER int main(int argc, char** argv) { @@ -58,7 +58,7 @@ int main(int argc, char** argv) int myoptind = 0; char* myoptarg = NULL; -#endif /* !NO_TESTSUITE_MAIN_DRIVER && !NO_MAIN_FUNCTION */ +#endif /* !NO_TESTSUITE_MAIN_DRIVER */ #if !defined(NO_WOLFSSH_SERVER) && !defined(NO_WOLFSSH_CLIENT) diff --git a/tests/unit.c b/tests/unit.c index 99167fcb..f4cf689a 100644 --- a/tests/unit.c +++ b/tests/unit.c @@ -354,7 +354,7 @@ int wolfSSH_UnitTest(int argc, char** argv) } -#ifndef NO_MAIN_FUNCTION +#ifndef NO_UNITTEST_MAIN_DRIVER int main(int argc, char** argv) { return wolfSSH_UnitTest(argc, argv);