diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-25 16:45:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-25 16:46:37 +0100 |
commit | 8c26e79867739e13a8699883ec1fa86127d94aaf (patch) | |
tree | 1d4bfc11903ea7e321d7badb5dd01472c47d6598 /testsuites | |
parent | tmtests/tmcontext01: Use <rtems/test.h> (diff) | |
download | rtems-8c26e79867739e13a8699883ec1fa86127d94aaf.tar.bz2 |
tests: Produce proper begin/end messages
Diffstat (limited to '')
-rw-r--r-- | testsuites/libtests/tar02/init.c | 1 | ||||
-rw-r--r-- | testsuites/psxtests/psx13/test.c | 6 | ||||
-rw-r--r-- | testsuites/samples/iostream/init.cc | 5 | ||||
-rw-r--r-- | testsuites/sptests/sperror01/init.c | 23 | ||||
-rw-r--r-- | testsuites/sptests/sperror02/init.c | 22 | ||||
-rw-r--r-- | testsuites/sptests/sperror03/init.c | 22 |
6 files changed, 61 insertions, 18 deletions
diff --git a/testsuites/libtests/tar02/init.c b/testsuites/libtests/tar02/init.c index d95816509c..cfeda1b3bb 100644 --- a/testsuites/libtests/tar02/init.c +++ b/testsuites/libtests/tar02/init.c @@ -57,7 +57,6 @@ void test_tarfs_load(void) test_cat( "/home/test_file", 0, 0 ); /******************/ - TEST_BEGIN(); #if 0 printf( "========= /symlink =========\n" ); test_cat( "/symlink", 0, 0 ); diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c index c039bff868..fc50463e67 100644 --- a/testsuites/psxtests/psx13/test.c +++ b/testsuites/psxtests/psx13/test.c @@ -716,10 +716,10 @@ int main( printf ("Testing sync()...... "); sync(); + printf ("Done.\n"); + + TEST_END(); } - else - TEST_BEGIN(); - TEST_END(); rtems_test_exit(0); } diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc index 5133a8ddc1..610e73f03b 100644 --- a/testsuites/samples/iostream/init.cc +++ b/testsuites/samples/iostream/init.cc @@ -29,7 +29,7 @@ #include <stdlib.h> -const char rtems_test_name[] = "HELLO WORLD"; +const char rtems_test_name[] = "IOSTREAM"; rtems_task Init( rtems_task_argument ignored @@ -38,7 +38,8 @@ rtems_task Init( #if BSP_SMALL_MEMORY printf ("NO STDC++. MEMORY TOO SMALL"); #else - std::cout << "\n\n*** " << rtems_test_name << " TEST ***" << std::endl; + std::cout << std::endl << std::endl + << "*** BEGIN OF " << rtems_test_name << " TEST ***" << std::endl; std::cout << "Hello World" << std::endl; std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl; #endif diff --git a/testsuites/sptests/sperror01/init.c b/testsuites/sptests/sperror01/init.c index 1f3e3f97dc..4c40be5299 100644 --- a/testsuites/sptests/sperror01/init.c +++ b/testsuites/sptests/sperror01/init.c @@ -21,6 +21,21 @@ const char rtems_test_name[] = "SPERROR 1"; /* forward declarations to avoid warnings */ rtems_task Init(rtems_task_argument argument); +static void fatal_extension( + rtems_fatal_source source, + bool is_internal, + rtems_fatal_code error +) +{ + if ( + source == RTEMS_FATAL_SOURCE_EXIT + && !is_internal + && error == ENOMEM + ) { + rtems_test_endk(); + } +} + rtems_task Init( rtems_task_argument argument ) @@ -41,10 +56,9 @@ rtems_task Init( rtems_error( RTEMS_NO_MEMORY | RTEMS_ERROR_PANIC, "Dummy: Resources unavailable\n" - "*** END OF TEST Tests for error reporting routines - 01 ***\n" ); - - rtems_test_exit(0); + + rtems_test_assert(0); } /* configuration information */ @@ -53,7 +67,8 @@ rtems_task Init( #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_MAXIMUM_TASKS 1 -#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION +#define CONFIGURE_INITIAL_EXTENSIONS \ + { .fatal = fatal_extension }, RTEMS_TEST_INITIAL_EXTENSION #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/sptests/sperror02/init.c b/testsuites/sptests/sperror02/init.c index d4f74f58d2..dca2219305 100644 --- a/testsuites/sptests/sperror02/init.c +++ b/testsuites/sptests/sperror02/init.c @@ -21,6 +21,21 @@ const char rtems_test_name[] = "SPERROR 2"; /* forward declarations to avoid warnings */ rtems_task Init(rtems_task_argument argument); +static void fatal_extension( + rtems_fatal_source source, + bool is_internal, + rtems_fatal_code error +) +{ + if ( + source == RTEMS_FATAL_SOURCE_EXIT + && !is_internal + && error == 1 + ) { + rtems_test_endk(); + } +} + rtems_task Init( rtems_task_argument argument ) @@ -31,11 +46,9 @@ rtems_task Init( rtems_error( RTEMS_NO_MEMORY | RTEMS_ERROR_ABORT, "Dummy: Resources unavailable\n" - "*** END OF TEST Tests for error reporting routines - 02 ***\n" ); - - rtems_test_exit(0); + rtems_test_assert(0); } /* configuration information */ @@ -44,7 +57,8 @@ rtems_task Init( #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_MAXIMUM_TASKS 1 -#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION +#define CONFIGURE_INITIAL_EXTENSIONS \ + { .fatal = fatal_extension }, RTEMS_TEST_INITIAL_EXTENSION #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/sptests/sperror03/init.c b/testsuites/sptests/sperror03/init.c index 61b405d123..818b90755c 100644 --- a/testsuites/sptests/sperror03/init.c +++ b/testsuites/sptests/sperror03/init.c @@ -19,6 +19,21 @@ const char rtems_test_name[] = "SPERROR 3"; /* forward declarations to avoid warnings */ rtems_task Init(rtems_task_argument argument); +static void fatal_extension( + rtems_fatal_source source, + bool is_internal, + rtems_fatal_code error +) +{ + if ( + source == RTEMS_FATAL_SOURCE_EXIT + && !is_internal + && error == 0 + ) { + rtems_test_endk(); + } +} + rtems_task Init( rtems_task_argument argument ) @@ -27,11 +42,9 @@ rtems_task Init( rtems_panic( "Dummy panic\n" - "*** END OF TEST Tests for error reporting routines - 03 ***\n" ); - - rtems_test_exit(0); + rtems_test_assert(0); } /* configuration information */ @@ -40,7 +53,8 @@ rtems_task Init( #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_MAXIMUM_TASKS 1 -#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION +#define CONFIGURE_INITIAL_EXTENSIONS \ + { .fatal = fatal_extension }, RTEMS_TEST_INITIAL_EXTENSION #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |