Mayank Gupta / Mbed OS pelion-example-frdm

Dependencies:   FXAS21002 FXOS8700Q

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pal_tests_nonstandard_entrypoint.c Source File

pal_tests_nonstandard_entrypoint.c

00001 /*******************************************************************************
00002  * Copyright 2018 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 
00017 
00018 #if (PAL_UNIT_TESTING_NONSTANDARD_ENTRYPOINT)
00019 
00020 #include "test_runners.h"
00021 
00022 // Entry point for the module specific test suites. This code is executed from
00023 // a OS which does not support calling main(), but has hook for
00024 // mbed_cloud_application_entrypoint(). This requires one to build the whole system
00025 // binary again for each test, but what can you do, without dynamic loader support.
00026 int mbed_cloud_application_entrypoint(void)
00027 {
00028     int status;
00029 
00030 #if defined(PAL_UNIT_TEST_FILESYSTEM)
00031     status = palFileSystemTestMain();
00032 #elif defined(PAL_UNIT_TEST_NETWORK)
00033     status = palNetworkTestMain();
00034 #elif defined(PAL_UNIT_TEST_CRYPTO)
00035     status = palCryptoTestMain();
00036 #elif defined(PAL_UNIT_TEST_DRBG)
00037     status = palDRBGTestMain();
00038 #elif defined(PAL_UNIT_TEST_ROT)
00039     status = palROTTestMain();
00040 #elif defined(PAL_UNIT_TEST_RTOS)
00041     status = palRTOSTestMain();
00042 #elif defined(PAL_UNIT_TEST_STORAGE)
00043     status = palStorageTestMain();
00044 #elif defined(PAL_UNIT_TEST_TIME)
00045     status = palTimeTestMain();
00046 #elif defined(PAL_UNIT_TEST_TLS)
00047     status = palTLSTestMain();
00048 #elif defined(PAL_UNIT_TEST_UPDATE)
00049     status = palUpdateTestMain();
00050 #elif defined(PAL_UNIT_TEST_SOTP)
00051     status = palSOTPTestMain();
00052 #elif defined(PAL_UNIT_TEST_SANITY)
00053     status = palSanityTestMain();
00054 #elif defined(PAL_UNIT_TEST_REFORMAT)
00055     status = palReformatTestMain();
00056 #else 
00057     // No need for defined(PAL_UNIT_TEST_ALL), this is likely the most needed one
00058     status = palAllTestMain(); // this will execute tests for all the other modules above
00059 #endif
00060 
00061     return status;
00062 }
00063 #endif