Automake Refactor

1. Rename TestsuiteTest() with wolfSSH prefix.
2. Add wolfSSH_TestsuiteTest to the testsuite.h header file.
3. Add check so main function to the testsuite can be left out of the build
   with the flag NO_MAIN_FUNCTION.
pull/469/head
John Safranek 2022-10-20 12:20:08 -07:00
parent df4576558f
commit 1bfb5c394b
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
2 changed files with 8 additions and 8 deletions

View File

@ -47,20 +47,18 @@
#include "tests/sftp.h"
#endif
#ifndef NO_TESTSUITE_MAIN_DRIVER
static int TestsuiteTest(int argc, char** argv);
#if !defined(NO_TESTSUITE_MAIN_DRIVER) && !defined(NO_MAIN_FUNCTION)
int main(int argc, char** argv)
{
return TestsuiteTest(argc, argv);
return wolfSSH_TestsuiteTest(argc, argv);
}
int myoptind = 0;
char* myoptarg = NULL;
#endif /* NO_TESTSUITE_MAIN_DRIVER */
#endif /* !NO_TESTSUITE_MAIN_DRIVER && !NO_MAIN_FUNCTION */
#if !defined(NO_WOLFSSH_SERVER) && !defined(NO_WOLFSSH_CLIENT)
@ -87,7 +85,7 @@ static int tsClientUserAuth(byte authType, WS_UserAuthData* authData, void* ctx)
#define NUMARGS 5
#define ARGLEN 32
int TestsuiteTest(int argc, char** argv)
int wolfSSH_TestsuiteTest(int argc, char** argv)
{
tcp_ready ready;
THREAD_TYPE serverThread;

View File

@ -18,7 +18,9 @@
* along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef _WOLFSSH_TESTS_TESTSUITE_H_
#define _WOLFSSH_TESTS_TESTSUITE_H_
int test_SFTP(int flag);
int wolfSSH_TestsuiteTest(int argc, char** argv);
#endif /* _WOLFSSH_TESTS_TESTSUITE_H_ */