forked from Imagelibrary/rtems
tests: Produce proper begin/end messages
This commit is contained in:
@@ -57,7 +57,6 @@ void test_tarfs_load(void)
|
|||||||
test_cat( "/home/test_file", 0, 0 );
|
test_cat( "/home/test_file", 0, 0 );
|
||||||
|
|
||||||
/******************/
|
/******************/
|
||||||
TEST_BEGIN();
|
|
||||||
#if 0
|
#if 0
|
||||||
printf( "========= /symlink =========\n" );
|
printf( "========= /symlink =========\n" );
|
||||||
test_cat( "/symlink", 0, 0 );
|
test_cat( "/symlink", 0, 0 );
|
||||||
|
|||||||
@@ -716,10 +716,10 @@ int main(
|
|||||||
|
|
||||||
printf ("Testing sync()...... ");
|
printf ("Testing sync()...... ");
|
||||||
sync();
|
sync();
|
||||||
}
|
printf ("Done.\n");
|
||||||
else
|
|
||||||
TEST_BEGIN();
|
TEST_END();
|
||||||
|
}
|
||||||
|
|
||||||
TEST_END();
|
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
const char rtems_test_name[] = "HELLO WORLD";
|
const char rtems_test_name[] = "IOSTREAM";
|
||||||
|
|
||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument ignored
|
rtems_task_argument ignored
|
||||||
@@ -38,7 +38,8 @@ rtems_task Init(
|
|||||||
#if BSP_SMALL_MEMORY
|
#if BSP_SMALL_MEMORY
|
||||||
printf ("NO STDC++. MEMORY TOO SMALL");
|
printf ("NO STDC++. MEMORY TOO SMALL");
|
||||||
#else
|
#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 << "Hello World" << std::endl;
|
||||||
std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl;
|
std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,6 +21,21 @@ const char rtems_test_name[] = "SPERROR 1";
|
|||||||
/* forward declarations to avoid warnings */
|
/* forward declarations to avoid warnings */
|
||||||
rtems_task Init(rtems_task_argument argument);
|
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 Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -41,10 +56,9 @@ rtems_task Init(
|
|||||||
rtems_error(
|
rtems_error(
|
||||||
RTEMS_NO_MEMORY | RTEMS_ERROR_PANIC,
|
RTEMS_NO_MEMORY | RTEMS_ERROR_PANIC,
|
||||||
"Dummy: Resources unavailable\n"
|
"Dummy: Resources unavailable\n"
|
||||||
"*** END OF TEST Tests for error reporting routines - 01 ***\n"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configuration information */
|
/* configuration information */
|
||||||
@@ -53,7 +67,8 @@ rtems_task Init(
|
|||||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#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
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,21 @@ const char rtems_test_name[] = "SPERROR 2";
|
|||||||
/* forward declarations to avoid warnings */
|
/* forward declarations to avoid warnings */
|
||||||
rtems_task Init(rtems_task_argument argument);
|
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 Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -31,11 +46,9 @@ rtems_task Init(
|
|||||||
rtems_error(
|
rtems_error(
|
||||||
RTEMS_NO_MEMORY | RTEMS_ERROR_ABORT,
|
RTEMS_NO_MEMORY | RTEMS_ERROR_ABORT,
|
||||||
"Dummy: Resources unavailable\n"
|
"Dummy: Resources unavailable\n"
|
||||||
"*** END OF TEST Tests for error reporting routines - 02 ***\n"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configuration information */
|
/* configuration information */
|
||||||
@@ -44,7 +57,8 @@ rtems_task Init(
|
|||||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#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
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,21 @@ const char rtems_test_name[] = "SPERROR 3";
|
|||||||
/* forward declarations to avoid warnings */
|
/* forward declarations to avoid warnings */
|
||||||
rtems_task Init(rtems_task_argument argument);
|
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 Init(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
@@ -27,11 +42,9 @@ rtems_task Init(
|
|||||||
|
|
||||||
rtems_panic(
|
rtems_panic(
|
||||||
"Dummy panic\n"
|
"Dummy panic\n"
|
||||||
"*** END OF TEST Tests for error reporting routines - 03 ***\n"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
rtems_test_exit(0);
|
rtems_test_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configuration information */
|
/* configuration information */
|
||||||
@@ -40,7 +53,8 @@ rtems_task Init(
|
|||||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||||
|
|
||||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
#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
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user