dhgdh

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by joey shelton

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers test_env.h Source File

test_env.h

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