Added new Xcode project for test suite. Added Xcode workspace file. Added library support for iOS and OS X targets. Updated project files to Xcode 7. Updated README. Added shared user_settings.h. Cleanup of the test.h "ChangeDirBack" function. Cleanup of duplicate ChangeDirBack() code in testsuite.c and adjusted for new Xcode build location.

This commit is contained in:
David Garske
2015-10-09 10:25:40 -07:00
parent 7e5be2f313
commit 6e61a095c7
9 changed files with 1374 additions and 112 deletions

View File

@@ -53,6 +53,23 @@ static const char *outputName;
int myoptind = 0;
char* myoptarg = NULL;
// This function changes the current directory to the wolfssl root
static void ChangeDirToRoot(void)
{
/* Normal Command Line=_build, Visual Studio=testsuite */
if (CurrentDir("testsuite") || CurrentDir("_build")) {
ChangeDirBack(1);
}
/* Xcode: To output application to correct location: */
/* 1. Xcode->Preferences->Locations->Locations */
/* 2. Derived Data Advanced -> Custom */
/* 3. Relative to Workspace, Build/Products */
/* Build/Products/Debug or Build/Products/Release */
else if (CurrentDir("Debug") || CurrentDir("Release")) {
ChangeDirBack(5);
}
}
#ifndef NO_TESTSUITE_MAIN_DRIVER
@@ -100,13 +117,7 @@ int testsuite_test(int argc, char** argv)
#endif
#if !defined(WOLFSSL_TIRTOS)
if (CurrentDir("testsuite") || CurrentDir("_build"))
ChangeDirBack(1);
else if (CurrentDir("Debug") || CurrentDir("Release"))
ChangeDirBack(3); /* Xcode->Preferences->Locations->Locations*/
/* Derived Data Advanced -> Custom */
/* Relative to Workspace, Build/Products */
/* Debug or Release */
ChangeDirToRoot();
#endif
#ifdef WOLFSSL_TIRTOS
@@ -419,13 +430,7 @@ int main(int argc, char** argv)
server_args.argc = argc;
server_args.argv = argv;
if (CurrentDir("testsuite") || CurrentDir("_build"))
ChangeDirBack(1);
else if (CurrentDir("Debug") || CurrentDir("Release"))
ChangeDirBack(3); /* Xcode->Preferences->Locations->Locations*/
/* Derived Data Advanced -> Custom */
/* Relative to Workspace, Build/Products */
/* Debug or Release */
ChangeDirToRoot();
wolfcrypt_test(&server_args);
if (server_args.return_code != 0) return server_args.return_code;