Merge pull request #647 from kaleb-himes/RIOT_OS

RIOT OS support, test scripts will be submitted to RIOT-OS repository
This commit is contained in:
dgarske
2016-12-10 19:13:19 -08:00
committed by GitHub
5 changed files with 24 additions and 5 deletions

View File

@@ -210,7 +210,7 @@ int testsuite_test(int argc, char** argv)
#endif /* HAVE_WNR */ #endif /* HAVE_WNR */
printf("\nAll tests passed!\n"); printf("\nAll tests passed!\n");
return EXIT_SUCCESS; EXIT_TEST(EXIT_SUCCESS);
} }
void simple_test(func_args* args) void simple_test(func_args* args)
@@ -411,7 +411,8 @@ int main(int argc, char** argv)
if (server_args.return_code != 0) return server_args.return_code; if (server_args.return_code != 0) return server_args.return_code;
printf("\nAll tests passed!\n"); printf("\nAll tests passed!\n");
return EXIT_SUCCESS;
EXIT_TEST(EXIT_SUCCESS);
} }

View File

@@ -483,7 +483,7 @@ int benchmark_test(void *args)
ShowMemoryTracker(); ShowMemoryTracker();
#endif #endif
return 0; EXIT_TEST(0);
} }

View File

@@ -264,7 +264,8 @@ static int err_sys(const char* msg, int es)
{ {
printf("%s error = %d\n", msg, es); printf("%s error = %d\n", msg, es);
return -1; /* error state */
EXIT_TEST(-1);
} }
/* func_args from test.h, so don't have to pull in other junk */ /* func_args from test.h, so don't have to pull in other junk */
@@ -744,7 +745,7 @@ int wolfcrypt_test(void* args)
err_sys("Failed to free netRandom context", -1238); err_sys("Failed to free netRandom context", -1238);
#endif /* HAVE_WNR */ #endif /* HAVE_WNR */
return args.return_code; EXIT_TEST(args.return_code);
} }
#endif /* NO_MAIN_DRIVER */ #endif /* NO_MAIN_DRIVER */

View File

@@ -147,6 +147,9 @@
/* Uncomment next line if building for embOS */ /* Uncomment next line if building for embOS */
/* #define WOLFSSL_EMBOS */ /* #define WOLFSSL_EMBOS */
/* Uncomment next line if building for RIOT-OS */
/* #define WOLFSSL_RIOT_OS */
#include <wolfssl/wolfcrypt/visibility.h> #include <wolfssl/wolfcrypt/visibility.h>
#ifdef WOLFSSL_USER_SETTINGS #ifdef WOLFSSL_USER_SETTINGS
@@ -408,6 +411,15 @@
#define SINGLE_THREADED /* Not ported at this time */ #define SINGLE_THREADED /* Not ported at this time */
#endif #endif
#ifdef WOLFSSL_RIOT_OS
#define NO_WRITEV
#define TFM_NO_ASM
#define USE_FAST_MATH
#define NO_FILE_SYSTEM
#define USE_CERT_BUFFERS_2048
#define HAVE_ECC
#endif
#ifdef WOLFSSL_NRF5x #ifdef WOLFSSL_NRF5x
#define SIZEOF_LONG 4 #define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8 #define SIZEOF_LONG_LONG 8

View File

@@ -407,6 +407,11 @@
#endif #endif
#endif /* WOLFSSL_AESNI or WOLFSSL_ARMASM */ #endif /* WOLFSSL_AESNI or WOLFSSL_ARMASM */
#ifdef WOLFSSL_RIOT_OS
#define EXIT_TEST(ret) exit(ret)
#else
#define EXIT_TEST(ret) return ret
#endif
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */