aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/ch_test.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-10-16 18:58:50 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-10-16 18:58:50 +0000
commit734aea5b10f4d7470d29c07ae51fbd9d9b588205 (patch)
treeabe9d3be9dd9cecdf0d6dcb96863b3378742e547 /test/lib/ch_test.c
parent3aafb1ec45b251b45a6a52a7492b649b1ee5c41d (diff)
downloadChibiOS-734aea5b10f4d7470d29c07ae51fbd9d9b588205.tar.gz
ChibiOS-734aea5b10f4d7470d29c07ae51fbd9d9b588205.tar.bz2
ChibiOS-734aea5b10f4d7470d29c07ae51fbd9d9b588205.zip
Enhanced test system, not complete yet.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10837 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/lib/ch_test.c')
-rw-r--r--test/lib/ch_test.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/lib/ch_test.c b/test/lib/ch_test.c
index 11d7ac095..c78cebea2 100644
--- a/test/lib/ch_test.c
+++ b/test/lib/ch_test.c
@@ -217,13 +217,14 @@ void test_emit_token_i(char token) {
*
* @param[in] stream pointer to a @p BaseSequentialStream object for test
* output
+ * @param[in] tsp test suite to execute
* @return A failure boolean value casted to @p msg_t.
* @retval false if no errors occurred.
* @retval true if one or more tests failed.
*
* @api
*/
-msg_t test_execute(BaseSequentialStream *stream, testsuite_t ts) {
+msg_t test_execute(BaseSequentialStream *stream, const testsuite_t *tsp) {
int i, j;
test_chp = stream;
@@ -251,21 +252,21 @@ msg_t test_execute(BaseSequentialStream *stream, testsuite_t ts) {
test_global_fail = false;
i = 0;
- while (ts[i] != NULL) {
+ while (tsp->sequences[i] != NULL) {
j = 0;
- while (ts[i][j] != NULL) {
+ while (tsp->sequences[i]->cases[j] != NULL) {
print_line();
test_print("--- Test Case ");
test_printn(i + 1);
test_print(".");
test_printn(j + 1);
test_print(" (");
- test_print(ts[i][j]->name);
+ test_print(tsp->sequences[i]->cases[j]->name);
test_println(")");
#if TEST_DELAY_BETWEEN_TESTS > 0
osalThreadSleepMilliseconds(TEST_DELAY_BETWEEN_TESTS);
#endif
- execute_test(ts[i][j]);
+ execute_test(tsp->sequences[i]->cases[j]);
if (test_local_fail) {
test_print("--- Result: FAILURE (#");
test_printn(test_step);