Index: testsuites/libtests/complex/Makefile.am
===================================================================
--- testsuites/libtests/complex/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/complex/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -13,4 +13,6 @@
 include $(top_srcdir)/../automake/leaf.am
 
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
 if HAS_COMPLEX
 complex_LDADD = -lm
Index: testsuites/libtests/complex/init.c
===================================================================
--- testsuites/libtests/complex/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/complex/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -23,11 +23,4 @@
 #endif
 
-#if __rtems__
-#include <bsp.h> /* for device driver prototypes */
-#include <rtems/test.h>
-
-const char rtems_test_name[] = "COMPLEX";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
@@ -38,4 +31,8 @@
 
 #if __rtems__
+#include <tmacros.h>
+
+const char rtems_test_name[] = "COMPLEX";
+
 /* NOTICE: the clock driver is explicitly disabled */
 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
@@ -61,5 +58,5 @@
 #if __rtems__
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
-  rtems_test_begin();
+  TEST_BEGIN();
 #endif
 
@@ -68,5 +65,5 @@
   docomplexl();
 #if __rtems__
-  rtems_test_end();
+  TEST_END();
 #endif
   exit( 0 );
Index: testsuites/libtests/math/Makefile.am
===================================================================
--- testsuites/libtests/math/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/math/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -7,4 +7,6 @@
 include $(top_srcdir)/../automake/compile.am
 include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
 
 math_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/math
Index: testsuites/libtests/math/init.c
===================================================================
--- testsuites/libtests/math/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/math/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -23,15 +23,4 @@
 #endif
 
-/*
- * @fixme This test should use the test macros but the include paths are
- *        are wrong in the build system.
- */
-#if __rtems__
-#include <bsp.h> /* for device driver prototypes */
-#include <rtems/test.h>
-
-const char rtems_test_name[] = "MATH";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
@@ -40,4 +29,8 @@
 
 #if __rtems__
+#include <tmacros.h>
+
+const char rtems_test_name[] = "MATH";
+
 /* NOTICE: the clock driver is explicitly disabled */
 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
Index: testsuites/libtests/mathf/Makefile.am
===================================================================
--- testsuites/libtests/mathf/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/mathf/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -7,4 +7,6 @@
 include $(top_srcdir)/../automake/compile.am
 include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
 
 mathf_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/math
Index: testsuites/libtests/mathf/init.c
===================================================================
--- testsuites/libtests/mathf/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/mathf/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -23,11 +23,4 @@
 #endif
 
-#if __rtems__
-#include <bsp.h> /* for device driver prototypes */
-#include <rtems/test.h>
-
-const char rtems_test_name[] = "MATHF";
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
@@ -36,4 +29,8 @@
 
 #if __rtems__
+#include <tmacros.h>
+
+const char rtems_test_name[] = "MATHF";
+
 /* NOTICE: the clock driver is explicitly disabled */
 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
@@ -61,5 +58,5 @@
 #if __rtems__
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
-  rtems_test_begin();
+  TEST_BEGIN();
 #endif
 
@@ -67,5 +64,5 @@
 
 #if __rtems__
-  rtems_test_end();
+  TEST_END();
 #endif
   exit( 0 );
Index: testsuites/libtests/mathl/Makefile.am
===================================================================
--- testsuites/libtests/mathl/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/mathl/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -13,4 +13,6 @@
 include $(top_srcdir)/../automake/leaf.am
 
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
 mathl_LDADD = -lm
 
Index: testsuites/libtests/mathl/init.c
===================================================================
--- testsuites/libtests/mathl/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/libtests/mathl/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -36,4 +36,6 @@
 
 #if __rtems__
+#include <tmacros.h>
+
 /* NOTICE: the clock driver is explicitly disabled */
 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
@@ -61,5 +63,5 @@
 #if __rtems__
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
-  rtems_test_begin();
+  TEST_BEGIN();
 #endif
 
@@ -67,5 +69,5 @@
 
 #if __rtems__
-  rtems_test_end();
+  TEST_END();
 #endif
   exit( 0 );
Index: testsuites/samples/capture/Makefile.am
===================================================================
--- testsuites/samples/capture/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/capture/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -10,4 +10,5 @@
 include $(top_srcdir)/../automake/leaf.am
 
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
 
 LINK_OBJS = $(capture_OBJECTS)
Index: testsuites/samples/capture/init.c
===================================================================
--- testsuites/samples/capture/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/capture/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -15,6 +15,4 @@
 
 #include "system.h"
-#include <stdio.h>
-#include <stdlib.h>
 
 #include <rtems.h>
@@ -22,8 +20,5 @@
 #include <rtems/monitor.h>
 #include <rtems/shell.h>
-
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
-static void notification(int fd, int seconds_remaining, void *arg);
+#include <tmacros.h>
 
 const char rtems_test_name[] = "CAPTURE ENGINE";
@@ -48,5 +43,5 @@
 
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
-  rtems_test_begin();
+  TEST_BEGIN();
 
   status = rtems_shell_wait_for_input(
@@ -75,7 +70,6 @@
     rtems_task_delete (RTEMS_SELF);
   } else {
-    rtems_test_end();
-
-    exit( 0 );
+    TEST_END();
+    rtems_test_exit( 0 );
   }
 }
Index: testsuites/samples/hello/Makefile.am
===================================================================
--- testsuites/samples/hello/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/hello/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -10,4 +10,5 @@
 include $(top_srcdir)/../automake/leaf.am
 
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
 
 LINK_OBJS = $(hello_OBJECTS)
Index: testsuites/samples/hello/init.c
===================================================================
--- testsuites/samples/hello/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/hello/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -12,26 +12,18 @@
 #endif
 
-#include <rtems/printer.h>
-#include <rtems/test.h>
-
-#include <bsp.h> /* for device driver prototypes */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
+#include <rtems.h>
+#include <tmacros.h>
 
 const char rtems_test_name[] = "HELLO WORLD";
 
-rtems_task Init(
+static rtems_task Init(
   rtems_task_argument ignored
 )
 {
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
-  rtems_test_begin();
+  TEST_BEGIN();
   printf( "Hello World\n" );
-  rtems_test_end();
-  exit( 0 );
+  TEST_END();
+  rtems_test_exit( 0 );
 }
 
Index: testsuites/samples/loopback/Makefile.am
===================================================================
--- testsuites/samples/loopback/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/loopback/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -9,4 +9,5 @@
 include $(top_srcdir)/../automake/leaf.am
 
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
 
 LINK_OBJS = $(loopback_OBJECTS)
Index: testsuites/samples/loopback/init.c
===================================================================
--- testsuites/samples/loopback/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/loopback/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -9,7 +9,5 @@
 #endif
 
-#include <rtems/test.h>
-
-#include <bsp.h>
+#include <tmacros.h>
 
 const char rtems_test_name[] = "LOOPBACK";
@@ -74,19 +72,4 @@
     0
 };
-
-/*
- * Thread-safe output routines
- */
-static rtems_id printMutex;
-static void printSafe(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    rtems_semaphore_obtain(printMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-    vprintf(fmt, args);
-    rtems_semaphore_release(printMutex);
-    va_end(args);
-}
-#define printf printSafe
 
 /*
@@ -247,18 +230,8 @@
 Init (rtems_task_argument ignored)
 {
-    rtems_status_code sc;
-
     rtems_print_printer_fprintf_putc(&rtems_test_printer);
 
-    rtems_test_begin();
-
-    sc = rtems_semaphore_create(rtems_build_name('P','m','t','x'),
-                1,
-                RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY|
-                                    RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
-                0,
-                &printMutex);
-    if (sc != RTEMS_SUCCESSFUL)
-        rtems_panic("Can't create printf mutex:", rtems_status_text(sc));
+    TEST_BEGIN();
+
     printf("\"Network\" initializing!\n");
     rtems_bsdnet_initialize_network();
@@ -287,5 +260,5 @@
 
     rtems_task_wake_after(500);
-    rtems_test_end();
+    TEST_END();
     exit( 0 );
 }
Index: testsuites/samples/paranoia/Makefile.am
===================================================================
--- testsuites/samples/paranoia/Makefile.am	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/paranoia/Makefile.am	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -9,4 +9,6 @@
 include $(top_srcdir)/../automake/compile.am
 include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
 
 #  -DCYGNUS   turns on more verbose msgs
Index: testsuites/samples/paranoia/init.c
===================================================================
--- testsuites/samples/paranoia/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/paranoia/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -15,5 +15,5 @@
 #include "system.h"
 #include <stdio.h>
-#include <stdlib.h> /* exit */
+#include <tmacros.h>
 
 extern int paranoia(int, char **);
@@ -37,7 +37,7 @@
 
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
-  rtems_test_begin();
+  TEST_BEGIN();
   paranoia(1, args);
-  rtems_test_end();
-  exit( 0 );
+  TEST_END();
+  rtems_test_exit( 0 );
 }
Index: testsuites/samples/pppd/init.c
===================================================================
--- testsuites/samples/pppd/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/samples/pppd/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -23,4 +23,5 @@
 #include <rtems/shell.h>
 #include "netconfig.h"
+#include <tmacros.h>
 
 const char rtems_test_name[] = "PPPD";
@@ -40,5 +41,5 @@
   rtems_print_printer_fprintf_putc(&rtems_test_printer);
 
-  rtems_test_begin();
+  TEST_BEGIN();
 
   status = rtems_shell_wait_for_input(
@@ -49,5 +50,5 @@
   );
   if (status != RTEMS_SUCCESSFUL) {
-    rtems_test_end();
+    TEST_END();
     exit( 0 );
   }
Index: testsuites/smptests/smp05/init.c
===================================================================
--- testsuites/smptests/smp05/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/smptests/smp05/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -28,5 +28,5 @@
 static void success(void)
 {
-  rtems_test_end();
+  TEST_END();
   rtems_test_exit( 0 );
 }
@@ -51,5 +51,5 @@
 
   locked_print_initialize();
-  rtems_test_begin();
+  TEST_BEGIN();
 
   if ( rtems_get_processor_count() == 1 ) {
Index: testsuites/smptests/smp07/init.c
===================================================================
--- testsuites/smptests/smp07/init.c	(revision d71542c8bef50261bc3904ef6a17f0b6087d04d9)
+++ testsuites/smptests/smp07/init.c	(revision 7b00c2fac57740963d3c4d8bf1cf5eab3a31f22e)
@@ -31,5 +31,5 @@
 static void success(void)
 {
-  rtems_test_end( );
+  TEST_END( );
   rtems_test_exit( 0 );
 }
@@ -99,5 +99,5 @@
 
   locked_print_initialize();
-  rtems_test_begin();
+  TEST_BEGIN();
 
   if ( rtems_get_processor_count() == 1 ) {
