Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
test_runners.h
00001 /******************************************************************************* 00002 * Copyright 2016, 2017 ARM Ltd. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 *******************************************************************************/ 00016 #ifndef MBED_CLIENT_PAL_TEST_RUNNERS_H_ 00017 #define MBED_CLIENT_PAL_TEST_RUNNERS_H_ 00018 #include "pal.h" 00019 #include "pal_BSP.h" 00020 00021 00022 00023 #ifndef PAL_TEST_RTOS 00024 #define PAL_TEST_RTOS 0 00025 #endif // PAL_TEST_RTOS 00026 00027 #ifndef PAL_TEST_NETWORK 00028 #define PAL_TEST_NETWORK 0 00029 #endif // PAL_TEST_NETWORK 00030 00031 #ifndef PAL_TEST_TLS 00032 #define PAL_TEST_TLS 0 00033 #endif // PAL_TEST_TLS 00034 00035 #ifndef PAL_TEST_CRYPTO 00036 #define PAL_TEST_CRYPTO 0 00037 #endif // PAL_TEST_CRYPTO 00038 00039 #ifndef PAL_TEST_FS 00040 #define PAL_TEST_FS 0 00041 #endif // PAL_TEST_FS 00042 00043 #ifndef PAL_TEST_UPDATE 00044 #define PAL_TEST_UPDATE 0 00045 #endif // PAL_TEST_UPDATE 00046 00047 #ifndef PAL_TEST_FLASH 00048 #define PAL_TEST_FLASH 1 00049 #endif // PAL_TEST_FLASH 00050 00051 #ifndef TEST_PRINTF 00052 #define TEST_PRINTF(ARGS...) PAL_PRINTF(ARGS) 00053 #endif //TEST_PRINTF 00054 00055 #ifdef PAL_LINUX 00056 #define PAL_TEST_THREAD_STACK_SIZE 16*1024*sizeof(uint32_t) 00057 #else 00058 #define PAL_TEST_THREAD_STACK_SIZE 512*sizeof(uint32_t) 00059 #endif 00060 00061 00062 #ifdef __cplusplus 00063 extern "C" { 00064 #endif 00065 00066 00067 typedef void (*testMain_t)(pal_args_t *); 00068 int test_main(int argc, char * argv[], testMain_t func); 00069 00070 00071 00072 void TEST_pal_rtos_GROUP_RUNNER(void); 00073 00074 void TEST_pal_socket_GROUP_RUNNER(void); 00075 00076 void TEST_pal_tls_GROUP_RUNNER(void); 00077 00078 void TEST_pal_crypto_GROUP_RUNNER(void); 00079 00080 void TEST_pal_fileSystem_GROUP_RUNNER(void); 00081 00082 void TEST_pal_update_GROUP_RUNNER(void); 00083 00084 void TEST_pal_internalFlash_GROUP_RUNNER(void); 00085 00086 void TEST_pal_SOTP_GROUP_RUNNER(void); 00087 00088 void TEST_pal_sanity_GROUP_RUNNER(void); 00089 00090 00091 typedef struct _palTestsStatusData_t 00092 { 00093 int module; 00094 int test; 00095 int inner; 00096 unsigned long long numberOfTests; 00097 unsigned long long numOfTestsFailures; 00098 unsigned long long numberOfIgnoredTests; 00099 }palTestsStatusData_t; 00100 00101 00102 typedef enum _palTestModules_t 00103 { 00104 PAL_TEST_MODULE_START, 00105 PAL_TEST_MODULE_RTOS = PAL_TEST_MODULE_START, 00106 PAL_TEST_MODULE_SOCKET, 00107 PAL_TEST_MODULE_TLS, 00108 PAL_TEST_MODULE_CRYPTO, 00109 PAL_TEST_MODULE_FILESYSTEM, 00110 PAL_TEST_MODULE_UPDATE, 00111 PAL_TEST_MODULE_INTERNALFLASH, 00112 PAL_TEST_MODULE_SOTP, 00113 PAL_TEST_MODULE_SANITY, 00114 PAL_TEST_MODULE_ALL, 00115 PAL_TEST_MODULE_END 00116 }palTestModules_t; 00117 00118 typedef enum _palTestSOTPTests_t 00119 { 00120 PAL_TEST_SOTP_TEST_START, 00121 PAL_TEST_SOTP_TEST_SW_HW_ROT = PAL_TEST_SOTP_TEST_START, 00122 PAL_TEST_SOTP_TEST_TIME_INIT, 00123 PAL_TEST_SOTP_TEST_RANDOM, 00124 PAL_TEST_SOTP_TEST_END 00125 }palTestSOTPTests_t; 00126 00127 palStatus_t setPalTestStatus(palTestsStatusData_t palRebootTestStatus); 00128 00129 palStatus_t getPalTestStatus(void); 00130 00131 palStatus_t palTestReboot(palTestModules_t module ,palTestSOTPTests_t test ); 00132 00133 #ifdef __cplusplus 00134 } 00135 #endif 00136 00137 #endif /* MBED_CLIENT_PAL_TEST_RUNNERS_H_ */
Generated on Tue Jul 12 2022 19:01:37 by 1.7.2