Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
test_env.h
00001 00002 /** \addtogroup frameworks */ 00003 /** @{*/ 00004 /* 00005 * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved 00006 * SPDX-License-Identifier: Apache-2.0 00007 * 00008 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00009 * not use this file except in compliance with the License. 00010 * You may obtain a copy of the License at 00011 * 00012 * http://www.apache.org/licenses/LICENSE-2.0 00013 * 00014 * Unless required by applicable law or agreed to in writing, software 00015 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00016 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00017 * See the License for the specific language governing permissions and 00018 * limitations under the License. 00019 */ 00020 00021 #ifndef GREENTEA_CLIENT_TEST_ENV_H_ 00022 #define GREENTEA_CLIENT_TEST_ENV_H_ 00023 00024 #ifdef YOTTA_GREENTEA_CLIENT_VERSION_STRING 00025 #define MBED_GREENTEA_CLIENT_VERSION_STRING YOTTA_GREENTEA_CLIENT_VERSION_STRING 00026 #else 00027 #define MBED_GREENTEA_CLIENT_VERSION_STRING "1.3.0" 00028 #endif 00029 00030 #include <stdio.h> 00031 00032 /** 00033 * Auxilary macros 00034 */ 00035 #define NL "\n" 00036 #define RCNL "\r\n" 00037 00038 /** 00039 * Auxilary macros to keep mbed-drivers compatibility with utest before greentea-client 00040 */ 00041 #define TEST_ENV_TESTCASE_COUNT GREENTEA_TEST_ENV_TESTCASE_COUNT 00042 #define TEST_ENV_TESTCASE_START GREENTEA_TEST_ENV_TESTCASE_START 00043 #define TEST_ENV_TESTCASE_FINISH GREENTEA_TEST_ENV_TESTCASE_FINISH 00044 #define TEST_ENV_TESTCASE_SUMMARY GREENTEA_TEST_ENV_TESTCASE_SUMMARY 00045 00046 /** 00047 * Generic test suite transport protocol keys 00048 */ 00049 extern const char* GREENTEA_TEST_ENV_END; 00050 extern const char* GREENTEA_TEST_ENV_EXIT; 00051 extern const char* GREENTEA_TEST_ENV_SYNC; 00052 extern const char* GREENTEA_TEST_ENV_TIMEOUT; 00053 extern const char* GREENTEA_TEST_ENV_HOST_TEST_NAME; 00054 extern const char* GREENTEA_TEST_ENV_HOST_TEST_VERSION; 00055 00056 /** 00057 * Test suite success code strings 00058 */ 00059 extern const char* GREENTEA_TEST_ENV_SUCCESS; 00060 extern const char* GREENTEA_TEST_ENV_FAILURE; 00061 00062 /** 00063 * Test case transport protocol start/finish keys 00064 */ 00065 extern const char* GREENTEA_TEST_ENV_TESTCASE_NAME; 00066 extern const char* GREENTEA_TEST_ENV_TESTCASE_COUNT; 00067 extern const char* GREENTEA_TEST_ENV_TESTCASE_START; 00068 extern const char* GREENTEA_TEST_ENV_TESTCASE_FINISH; 00069 extern const char* GREENTEA_TEST_ENV_TESTCASE_SUMMARY; 00070 00071 /** 00072 * Code Coverage (LCOV) transport protocol keys 00073 */ 00074 extern const char* GREENTEA_TEST_ENV_LCOV_START; 00075 00076 /** 00077 * Greentea-client related API for communication with host side 00078 */ 00079 void GREENTEA_SETUP(const int, const char *); 00080 void GREENTEA_TESTSUITE_RESULT(const int); 00081 void GREENTEA_TESTCASE_START(const char *test_case_name); 00082 void GREENTEA_TESTCASE_FINISH(const char *test_case_name, const size_t passes, const size_t failed); 00083 00084 /** 00085 * Test suite result related notification API 00086 */ 00087 void greentea_send_kv(const char *, const char *); 00088 void greentea_send_kv(const char *, const int); 00089 void greentea_send_kv(const char *, const int, const int); 00090 void greentea_send_kv(const char *, const char *, const int); 00091 void greentea_send_kv(const char *, const char *, const int, const int); 00092 int greentea_parse_kv(char *, char *, const int, const int); 00093 00094 #ifdef MBED_CFG_DEBUG_OPTIONS_COVERAGE 00095 /** 00096 * Code Coverage API 00097 */ 00098 void greentea_notify_coverage_start(const char *path); 00099 void greentea_notify_coverage_end(); 00100 #endif // MBED_CFG_DEBUG_OPTIONS_COVERAGE 00101 00102 #endif // GREENTEA_CLIENT_TEST_ENV_H_ 00103 00104 /** @}*/
Generated on Tue Jul 12 2022 13:16:15 by
