Incorporated review comments

pull/11721/head
RAJKUMAR KANAGARAJ 2019-11-08 04:29:13 -08:00
parent 74d19395f6
commit 9e994cfe38
23 changed files with 93 additions and 46 deletions

View File

@ -20,7 +20,5 @@
/*
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
*/
#if INTEGRATION_TESTS
size_t download_test(NetworkInterface *interface, const unsigned char *data, size_t data_length, size_t buff_size, uint32_t thread_id = 0);
#endif

View File

@ -20,8 +20,6 @@
/*
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
*/
#if INTEGRATION_TESTS
void file_test_write(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);
void file_test_read(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);
#endif

View File

@ -162,4 +162,4 @@ int main()
return !Harness::run(specification);
}
#endif
#endif // !INTEGRATION_TESTS

View File

@ -181,4 +181,4 @@ int main()
return !Harness::run(specification);
}
#endif
#endif // !INTEGRATION_TESTS

View File

@ -139,4 +139,4 @@ int main()
return !Harness::run(specification);
}
#endif
#endif // !INTEGRATION_TESTS

View File

@ -173,4 +173,4 @@ int main()
return !Harness::run(specification);
}
#endif
#endif // !INTEGRATION_TESTS

View File

@ -244,4 +244,4 @@ int main()
return !Harness::run(specification);
}
#endif
#endif // !INTEGRATION_TESTS

View File

@ -14,9 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Race test test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Test not supported for single threaded and also bare metal enviroment. UsTicker need to be enabled for this test.
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -133,4 +136,5 @@ int main()
Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_THREAD)

View File

@ -14,13 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] RTOS basic test cases require RTOS with multithread to run
#else
#include "mbed.h"
#include "greentea-client/test_env.h"
#include "utest/utest.h"
#include "unity/unity.h"
#if defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
using utest::v1::Case;
@ -116,4 +120,5 @@ int main()
utest::v1::Harness::run(specification);
}
#endif // defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Condition variable test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -186,4 +189,5 @@ int main()
return !Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Event flags test cases require RTOS with multithread to run
#else
#include "mbed.h"
#include "greentea-client/test_env.h"
@ -22,8 +25,8 @@
using utest::v1::Case;
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
@ -371,4 +374,5 @@ int main()
return !utest::v1::Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] mail test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -510,4 +513,5 @@ int main()
return !Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Mutex test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -306,4 +309,5 @@ int main()
return !Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Queue test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -346,4 +349,5 @@ int main()
return !Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -15,7 +15,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#error [NOT_SUPPORTED] RTOS timer test cases require RTOS to run
#else
#include "mbed.h"

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Semaphore test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -247,4 +250,5 @@ int main()
return !Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -13,6 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Signals test cases require RTOS with multithread to run
#else
#include "mbed.h"
#include "greentea-client/test_env.h"
#include "utest/utest.h"
@ -20,8 +24,8 @@
using utest::v1::Case;
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#define TEST_STACK_SIZE 512
@ -393,4 +397,5 @@ int main()
return !utest::v1::Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -19,13 +19,13 @@
#include "unity.h"
#include "utest.h"
#include "ticker_api.h"
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] systimer test cases requires RTOS to run.
#else
#if defined(MBED_CONF_RTOS_PRESENT)
extern "C" {
#include "rtx_lib.h"
}
#endif
#include "platform/source/SysTimer.h"
#define TEST_TICKS 42
@ -354,4 +354,3 @@ int main()
{
return !Harness::run(specification);
}
#endif

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] Threads test cases require RTOS with multithread to run
#else
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
#else
#include "mbed.h"
@ -848,4 +851,5 @@ int main()
return !Harness::run(specification);
}
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
#endif // !DEVICE_USTICKER
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] USB test cases requires RTOS to run.
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
#else
#include <stdio.h>

View File

@ -14,6 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
#else
#if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
#error [NOT_SUPPORTED] USB Device not supported for this target
#else
@ -385,3 +389,4 @@ int main()
}
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
#endif // !defined(MBED_CONF_RTOS_PRESENT)

View File

@ -16,7 +16,7 @@
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] USB test cases are not supported on Bare metal
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
#else
#include <stdio.h>

View File

@ -14,6 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if !defined(MBED_CONF_RTOS_PRESENT)
#error [NOT_SUPPORTED] USB stack and test cases require RTOS to run.
#else
#if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
#error [NOT_SUPPORTED] USB Device not supported for this target
#else
@ -848,3 +852,4 @@ int main()
}
#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE
#endif // !defined(MBED_CONF_RTOS_PRESENT)