Changeset 7b00c2fa in rtems


Ignore:
Timestamp:
Nov 6, 2017, 6:56:17 AM (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
bceb9db6
Parents:
d71542c
git-author:
Sebastian Huber <sebastian.huber@…> (11/06/17 06:56:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/06/17 08:06:20)
Message:

tests: Use <tmacros.h> in all tests

Update #3170.
Update #3199.

Location:
testsuites
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/complex/Makefile.am

    rd71542c r7b00c2fa  
    1313include $(top_srcdir)/../automake/leaf.am
    1414
     15AM_CPPFLAGS += -I$(top_srcdir)/../support/include
     16
    1517if HAS_COMPLEX
    1618complex_LDADD = -lm
  • testsuites/libtests/complex/init.c

    rd71542c r7b00c2fa  
    2323#endif
    2424
    25 #if __rtems__
    26 #include <bsp.h> /* for device driver prototypes */
    27 #include <rtems/test.h>
    28 
    29 const char rtems_test_name[] = "COMPLEX";
    30 #endif
    31 
    3225#include <stdio.h>
    3326#include <stdlib.h>
     
    3831
    3932#if __rtems__
     33#include <tmacros.h>
     34
     35const char rtems_test_name[] = "COMPLEX";
     36
    4037/* NOTICE: the clock driver is explicitly disabled */
    4138#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
     
    6158#if __rtems__
    6259  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    63   rtems_test_begin();
     60  TEST_BEGIN();
    6461#endif
    6562
     
    6865  docomplexl();
    6966#if __rtems__
    70   rtems_test_end();
     67  TEST_END();
    7168#endif
    7269  exit( 0 );
  • testsuites/libtests/math/Makefile.am

    rd71542c r7b00c2fa  
    77include $(top_srcdir)/../automake/compile.am
    88include $(top_srcdir)/../automake/leaf.am
     9
     10AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    911
    1012math_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/math
  • testsuites/libtests/math/init.c

    rd71542c r7b00c2fa  
    2323#endif
    2424
    25 /*
    26  * @fixme This test should use the test macros but the include paths are
    27  *        are wrong in the build system.
    28  */
    29 #if __rtems__
    30 #include <bsp.h> /* for device driver prototypes */
    31 #include <rtems/test.h>
    32 
    33 const char rtems_test_name[] = "MATH";
    34 #endif
    35 
    3625#include <stdio.h>
    3726#include <stdlib.h>
     
    4029
    4130#if __rtems__
     31#include <tmacros.h>
     32
     33const char rtems_test_name[] = "MATH";
     34
    4235/* NOTICE: the clock driver is explicitly disabled */
    4336#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
  • testsuites/libtests/mathf/Makefile.am

    rd71542c r7b00c2fa  
    77include $(top_srcdir)/../automake/compile.am
    88include $(top_srcdir)/../automake/leaf.am
     9
     10AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    911
    1012mathf_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/math
  • testsuites/libtests/mathf/init.c

    rd71542c r7b00c2fa  
    2323#endif
    2424
    25 #if __rtems__
    26 #include <bsp.h> /* for device driver prototypes */
    27 #include <rtems/test.h>
    28 
    29 const char rtems_test_name[] = "MATHF";
    30 #endif
    31 
    3225#include <stdio.h>
    3326#include <stdlib.h>
     
    3629
    3730#if __rtems__
     31#include <tmacros.h>
     32
     33const char rtems_test_name[] = "MATHF";
     34
    3835/* NOTICE: the clock driver is explicitly disabled */
    3936#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
     
    6158#if __rtems__
    6259  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    63   rtems_test_begin();
     60  TEST_BEGIN();
    6461#endif
    6562
     
    6764
    6865#if __rtems__
    69   rtems_test_end();
     66  TEST_END();
    7067#endif
    7168  exit( 0 );
  • testsuites/libtests/mathl/Makefile.am

    rd71542c r7b00c2fa  
    1313include $(top_srcdir)/../automake/leaf.am
    1414
     15AM_CPPFLAGS += -I$(top_srcdir)/../support/include
     16
    1517mathl_LDADD = -lm
    1618
  • testsuites/libtests/mathl/init.c

    rd71542c r7b00c2fa  
    3636
    3737#if __rtems__
     38#include <tmacros.h>
     39
    3840/* NOTICE: the clock driver is explicitly disabled */
    3941#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
     
    6163#if __rtems__
    6264  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    63   rtems_test_begin();
     65  TEST_BEGIN();
    6466#endif
    6567
     
    6769
    6870#if __rtems__
    69   rtems_test_end();
     71  TEST_END();
    7072#endif
    7173  exit( 0 );
  • testsuites/samples/capture/Makefile.am

    rd71542c r7b00c2fa  
    1010include $(top_srcdir)/../automake/leaf.am
    1111
     12AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1213
    1314LINK_OBJS = $(capture_OBJECTS)
  • testsuites/samples/capture/init.c

    rd71542c r7b00c2fa  
    1515
    1616#include "system.h"
    17 #include <stdio.h>
    18 #include <stdlib.h>
    1917
    2018#include <rtems.h>
     
    2220#include <rtems/monitor.h>
    2321#include <rtems/shell.h>
    24 
    25 /* forward declarations to avoid warnings */
    26 rtems_task Init(rtems_task_argument argument);
    27 static void notification(int fd, int seconds_remaining, void *arg);
     22#include <tmacros.h>
    2823
    2924const char rtems_test_name[] = "CAPTURE ENGINE";
     
    4843
    4944  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    50   rtems_test_begin();
     45  TEST_BEGIN();
    5146
    5247  status = rtems_shell_wait_for_input(
     
    7570    rtems_task_delete (RTEMS_SELF);
    7671  } else {
    77     rtems_test_end();
    78 
    79     exit( 0 );
     72    TEST_END();
     73    rtems_test_exit( 0 );
    8074  }
    8175}
  • testsuites/samples/hello/Makefile.am

    rd71542c r7b00c2fa  
    1010include $(top_srcdir)/../automake/leaf.am
    1111
     12AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1213
    1314LINK_OBJS = $(hello_OBJECTS)
  • testsuites/samples/hello/init.c

    rd71542c r7b00c2fa  
    1212#endif
    1313
    14 #include <rtems/printer.h>
    15 #include <rtems/test.h>
    16 
    17 #include <bsp.h> /* for device driver prototypes */
    18 
    19 #include <stdio.h>
    20 #include <stdlib.h>
    21 
    22 /* forward declarations to avoid warnings */
    23 rtems_task Init(rtems_task_argument argument);
     14#include <rtems.h>
     15#include <tmacros.h>
    2416
    2517const char rtems_test_name[] = "HELLO WORLD";
    2618
    27 rtems_task Init(
     19static rtems_task Init(
    2820  rtems_task_argument ignored
    2921)
    3022{
    3123  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    32   rtems_test_begin();
     24  TEST_BEGIN();
    3325  printf( "Hello World\n" );
    34   rtems_test_end();
    35   exit( 0 );
     26  TEST_END();
     27  rtems_test_exit( 0 );
    3628}
    3729
  • testsuites/samples/loopback/Makefile.am

    rd71542c r7b00c2fa  
    99include $(top_srcdir)/../automake/leaf.am
    1010
     11AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1112
    1213LINK_OBJS = $(loopback_OBJECTS)
  • testsuites/samples/loopback/init.c

    rd71542c r7b00c2fa  
    99#endif
    1010
    11 #include <rtems/test.h>
    12 
    13 #include <bsp.h>
     11#include <tmacros.h>
    1412
    1513const char rtems_test_name[] = "LOOPBACK";
     
    7472    0
    7573};
    76 
    77 /*
    78  * Thread-safe output routines
    79  */
    80 static rtems_id printMutex;
    81 static void printSafe(const char *fmt, ...)
    82 {
    83     va_list args;
    84     va_start(args, fmt);
    85     rtems_semaphore_obtain(printMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    86     vprintf(fmt, args);
    87     rtems_semaphore_release(printMutex);
    88     va_end(args);
    89 }
    90 #define printf printSafe
    9174
    9275/*
     
    247230Init (rtems_task_argument ignored)
    248231{
    249     rtems_status_code sc;
    250 
    251232    rtems_print_printer_fprintf_putc(&rtems_test_printer);
    252233
    253     rtems_test_begin();
    254 
    255     sc = rtems_semaphore_create(rtems_build_name('P','m','t','x'),
    256                 1,
    257                 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|RTEMS_INHERIT_PRIORITY|
    258                                     RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
    259                 0,
    260                 &printMutex);
    261     if (sc != RTEMS_SUCCESSFUL)
    262         rtems_panic("Can't create printf mutex:", rtems_status_text(sc));
     234    TEST_BEGIN();
     235
    263236    printf("\"Network\" initializing!\n");
    264237    rtems_bsdnet_initialize_network();
     
    287260
    288261    rtems_task_wake_after(500);
    289     rtems_test_end();
     262    TEST_END();
    290263    exit( 0 );
    291264}
  • testsuites/samples/paranoia/Makefile.am

    rd71542c r7b00c2fa  
    99include $(top_srcdir)/../automake/compile.am
    1010include $(top_srcdir)/../automake/leaf.am
     11
     12AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1113
    1214#  -DCYGNUS   turns on more verbose msgs
  • testsuites/samples/paranoia/init.c

    rd71542c r7b00c2fa  
    1515#include "system.h"
    1616#include <stdio.h>
    17 #include <stdlib.h> /* exit */
     17#include <tmacros.h>
    1818
    1919extern int paranoia(int, char **);
     
    3737
    3838  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    39   rtems_test_begin();
     39  TEST_BEGIN();
    4040  paranoia(1, args);
    41   rtems_test_end();
    42   exit( 0 );
     41  TEST_END();
     42  rtems_test_exit( 0 );
    4343}
  • testsuites/samples/pppd/init.c

    rd71542c r7b00c2fa  
    2323#include <rtems/shell.h>
    2424#include "netconfig.h"
     25#include <tmacros.h>
    2526
    2627const char rtems_test_name[] = "PPPD";
     
    4041  rtems_print_printer_fprintf_putc(&rtems_test_printer);
    4142
    42   rtems_test_begin();
     43  TEST_BEGIN();
    4344
    4445  status = rtems_shell_wait_for_input(
     
    4950  );
    5051  if (status != RTEMS_SUCCESSFUL) {
    51     rtems_test_end();
     52    TEST_END();
    5253    exit( 0 );
    5354  }
  • testsuites/smptests/smp05/init.c

    rd71542c r7b00c2fa  
    2828static void success(void)
    2929{
    30   rtems_test_end();
     30  TEST_END();
    3131  rtems_test_exit( 0 );
    3232}
     
    5151
    5252  locked_print_initialize();
    53   rtems_test_begin();
     53  TEST_BEGIN();
    5454
    5555  if ( rtems_get_processor_count() == 1 ) {
  • testsuites/smptests/smp07/init.c

    rd71542c r7b00c2fa  
    3131static void success(void)
    3232{
    33   rtems_test_end( );
     33  TEST_END( );
    3434  rtems_test_exit( 0 );
    3535}
     
    9999
    100100  locked_print_initialize();
    101   rtems_test_begin();
     101  TEST_BEGIN();
    102102
    103103  if ( rtems_get_processor_count() == 1 ) {
Note: See TracChangeset for help on using the changeset viewer.