Changeset 9391f6d in rtems


Ignore:
Timestamp:
Mar 10, 2014, 3:31:43 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
ad48ebb
Parents:
840ae71
git-author:
Sebastian Huber <sebastian.huber@…> (03/10/14 15:31:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/17/14 08:17:36)
Message:

tests/samples: Use <rtems/test.h>

Location:
testsuites/samples
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • testsuites/samples/base_mp/apptask.c

    r840ae71 r9391f6d  
    3838  printf( "This task was invoked with the node argument (%" PRIdrtems_task_argument ")\n", node );
    3939  printf( "This task has the id of 0x%" PRIxrtems_id "\n",  tid );
    40   printf( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION ***\n" );
     40  TEST_END();
    4141  exit( 0 );
    4242}
  • testsuites/samples/base_mp/init.c

    r840ae71 r9391f6d  
    1919rtems_task Init(rtems_task_argument argument);
    2020
     21const char rtems_test_name[] = "SAMPLE MULTIPROCESSOR APPLICATION";
     22
    2123rtems_task Init(
    2224  rtems_task_argument argument
     
    2729  rtems_status_code status;
    2830
    29   printf( "\n\n*** SAMPLE MULTIPROCESSOR APPLICATION ***\n" );
     31  TEST_BEGIN();
    3032  printf( "Creating and starting an application task\n" );
    3133  task_name = rtems_build_name( 'T', 'A', '1', ' ' );
  • testsuites/samples/base_mp/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516
    1617/* functions */
     
    3738#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    3839
     40#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     41
    3942/*
    4043 *  Put the overrides of default configuration parameters here.
  • testsuites/samples/base_sp/apptask.c

    r840ae71 r9391f6d  
    4242  );
    4343
    44   printf( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
     44  TEST_END();
    4545  exit( 0 );
    4646}
  • testsuites/samples/base_sp/init.c

    r840ae71 r9391f6d  
    2020rtems_task Init(rtems_task_argument argument);
    2121
     22const char rtems_test_name[] = "SAMPLE SINGLE PROCESSOR APPLICATION";
     23
    2224#define ARGUMENT 0
    2325
     
    3032  rtems_status_code status;
    3133
    32   printf( "\n\n*** SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
     34  TEST_BEGIN();
    3335  printf( "Creating and starting an application task\n" );
    3436
  • testsuites/samples/base_sp/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516
    1617/* functions */
     
    3435#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    3536
     37#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     38
    3639#include <rtems/confdefs.h>
    3740
  • testsuites/samples/capture/init.c

    r840ae71 r9391f6d  
    2929#endif
    3030
     31const char rtems_test_name[] = "CAPTURE ENGINE";
     32
    3133volatile int can_proceed = 1;
    3234
     
    5254  rtems_mode          old_mode;
    5355
    54   puts( "\n\n*** TEST CAPTURE ENGINE ***" );
     56  rtems_test_begin();
    5557
    5658  status = rtems_shell_wait_for_input(
     
    7981    rtems_task_delete (RTEMS_SELF);
    8082  } else {
    81     puts( "*** END OF TEST CAPTURE ENGINE ***" );
     83    rtems_test_end();
    8284
    8385    exit( 0 );
  • testsuites/samples/capture/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516
    1617/* functions */
     
    4950
    5051#define CONFIGURE_MAXIMUM_USER_EXTENSIONS (5)
     52
     53#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
    5154
    5255#include <rtems/confdefs.h>
  • testsuites/samples/cdtest/main.cc

    r840ae71 r9391f6d  
    2424
    2525#include <rtems.h>
     26#include <rtems/test.h>
    2627
    2728#include <cstdio>
     
    3132#include <iostream>
    3233#endif
     34
     35const char rtems_test_name[] = "CONSTRUCTOR/DESTRUCTOR";
    3336
    3437extern "C"
     
    177180)
    178181{
    179     printf( "\n\n*** CONSTRUCTOR/DESTRUCTOR TEST ***\n" );
     182    TEST_BEGIN();
    180183
    181184    cdtest();
    182185
    183     printf( "*** END OF CONSTRUCTOR/DESTRUCTOR TEST ***\n\n\n" );
    184 
     186    TEST_END();
    185187
    186188    printf( "*** TESTING C++ EXCEPTIONS ***\n\n" );
  • testsuites/samples/cdtest/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516
    1617/* functions */
     
    3435#define CONFIGURE_INIT_TASK_NAME          rtems_build_name( 'C', 'T', 'O', 'R' )
    3536
     37#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     38
    3639#include <rtems/confdefs.h>
    3740
  • testsuites/samples/fileio/init.c

    r840ae71 r9391f6d  
    3232#include <rtems/nvdisk-sram.h>
    3333#include <rtems/shell.h>
     34
     35const char rtems_test_name[] = "FILE I/O";
    3436
    3537#if FILEIO_BUILD
     
    12211223  rtems_status_code status;
    12221224
    1223   puts( "\n\n*** TEST FILE I/O SAMPLE ***" );
     1225  TEST_BEGIN();
    12241226
    12251227  status = rtems_shell_wait_for_input(
     
    12451247    directive_failed( status, "delete" );
    12461248  } else {
    1247     puts( "*** END OF TEST FILE I/O SAMPLE ***" );
     1249    TEST_END();
    12481250
    12491251    rtems_test_exit( 0 );
  • testsuites/samples/fileio/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516#include "tmacros.h"
    1617
     
    7374
    7475#define CONFIGURE_UNIFIED_WORK_AREAS
     76
     77#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     78
    7579#include <rtems/confdefs.h>
    7680
  • testsuites/samples/hello/init.c

    r840ae71 r9391f6d  
    1212#endif
    1313
     14#include <rtems/test.h>
     15
    1416#include <bsp.h> /* for device driver prototypes */
    1517
     
    2022rtems_task Init(rtems_task_argument argument);
    2123
     24const char rtems_test_name[] = "HELLO WORLD";
     25
    2226rtems_task Init(
    2327  rtems_task_argument ignored
    2428)
    2529{
    26   printf( "\n\n*** HELLO WORLD TEST ***\n" );
     30  rtems_test_begin();
    2731  printf( "Hello World\n" );
    28   printf( "*** END OF HELLO WORLD TEST ***\n" );
     32  rtems_test_end();
    2933  exit( 0 );
    3034}
     
    4044#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    4145
     46#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     47
    4248#define CONFIGURE_INIT
    4349#include <rtems/confdefs.h>
  • testsuites/samples/iostream/init.cc

    r840ae71 r9391f6d  
    3030#include <stdlib.h>
    3131
     32const char rtems_test_name[] = "HELLO WORLD";
     33
    3234rtems_task Init(
    3335  rtems_task_argument ignored
     
    3739  printf ("NO STDC++. MEMORY TOO SMALL");
    3840#else
    39   std::cout << "\n\n*** HELLO WORLD TEST ***" << std::endl;
     41  std::cout << "\n\n*** " << rtems_test_name << " TEST ***" << std::endl;
    4042  std::cout << "Hello World" << std::endl;
    41   std::cout << "*** END OF HELLO WORLD TEST ***" << std::endl;
     43  std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl;
    4244#endif
    4345  exit( 0 );
  • testsuites/samples/iostream/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516
    1617/* configuration information */
     
    3435#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
    3536
     37#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     38
    3639#include <rtems/confdefs.h>
    3740
  • testsuites/samples/loopback/init.c

    r840ae71 r9391f6d  
    99#endif
    1010
     11#include <rtems/test.h>
     12
    1113#include <bsp.h>
     14
     15const char rtems_test_name[] = "LOOPBACK";
    1216
    1317#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
     
    3337#define CONFIGURE_INIT
    3438rtems_task Init(rtems_task_argument argument);
     39
     40#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
    3541
    3642#include <rtems/confdefs.h>
     
    242248    rtems_status_code sc;
    243249
     250    rtems_test_begin();
     251
    244252    sc = rtems_semaphore_create(rtems_build_name('P','m','t','x'),
    245253                1,
     
    276284
    277285    rtems_task_wake_after(500);
    278     puts( "*** END OF LOOPBACK TEST ***" );
     286    rtems_test_end();
    279287    exit( 0 );
    280288}
  • testsuites/samples/nsecs/init.c

    r840ae71 r9391f6d  
    3535#include "pritime.h"
    3636
     37const char rtems_test_name[] = "NANOSECOND CLOCK";
     38
    3739static char *my_ctime( time_t t )
    3840{
     
    6365  int index;
    6466
    65   puts( "\n\n*** NANOSECOND CLOCK TEST ***" );
     67  TEST_BEGIN();
    6668
    6769  time.year   = 2007;
     
    138140  sleep(1);
    139141
    140   puts( "*** END OF NANOSECOND CLOCK TEST ***" );
     142  TEST_END();
    141143  exit(0);
    142144}
  • testsuites/samples/nsecs/system.h

    r840ae71 r9391f6d  
    11#ifndef SYSTEM_H
    22#define SYSTEM_H
     3
     4#include <rtems/test.h>
    35
    46#include <bsp.h> /* for device driver prototypes */
     
    1315#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    1416
     17#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     18
    1519#include <rtems/confdefs.h>
    1620#endif
  • testsuites/samples/paranoia/init.c

    r840ae71 r9391f6d  
    1919extern int paranoia(int, char **);
    2020
     21const char rtems_test_name[] = "PARANOIA";
     22
    2123char *args[2] = { "paranoia", 0 };
    2224
     
    3840#endif
    3941
    40   printf( "\n\n*** PARANOIA TEST ***\n" );
     42  rtems_test_begin();
    4143  paranoia(1, args);
    42   printf( "*** END OF PARANOIA TEST ***\n" );
     44  rtems_test_end();
    4345#endif /* BSP_SMALL_MEMORY */
    4446  exit( 0 );
  • testsuites/samples/paranoia/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516
    1617/* functions */
     
    3536#define CONFIGURE_EXTRA_TASK_STACKS       (1 * RTEMS_MINIMUM_STACK_SIZE)
    3637
     38#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     39
    3740#include <rtems/confdefs.h>
    3841
  • testsuites/samples/pppd/init.c

    r840ae71 r9391f6d  
    2525#endif
    2626
     27const char rtems_test_name[] = "PPPD";
     28
    2729rtems_task Init(rtems_task_argument argument)
    2830{
     
    3032  printf("NO NETWORKING. MEMORY TOO SMALL");
    3133#else
     34  rtems_test_begin();
     35
    3236  /* initialize network */
    3337  rtems_bsdnet_initialize_network();
  • testsuites/samples/pppd/system.h

    r840ae71 r9391f6d  
    33
    44#include <rtems.h>
     5#include <rtems/test.h>
    56#include <rtems/console.h>
    67#include <rtems/clockdrv.h>
     
    4142                                           RTEMS_INTERRUPT_LEVEL(0))
    4243
     44#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     45
    4346#include <rtems/confdefs.h>
    4447
  • testsuites/samples/ticker/init.c

    r840ae71 r9391f6d  
    1515#include "system.h"
    1616
     17const char rtems_test_name[] = "CLOCK TICK";
     18
    1719/*
    1820 *  Keep the names and IDs in global variables so another task can use them.
     
    2931  rtems_time_of_day time;
    3032
    31   puts( "\n\n*** CLOCK TICK TEST ***" );
     33  TEST_BEGIN();
    3234
    3335  time.year   = 1988;
  • testsuites/samples/ticker/system.h

    r840ae71 r9391f6d  
    1313
    1414#include <rtems.h>
     15#include <rtems/test.h>
    1516#include <inttypes.h>
    1617#include "tmacros.h"
     
    4950#define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
    5051
     52#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     53
    5154#include <rtems/confdefs.h>
    5255
  • testsuites/samples/ticker/tasks.c

    r840ae71 r9391f6d  
    3838    status = rtems_clock_get_tod( &time );
    3939    if ( time.second >= 35 ) {
    40       puts( "*** END OF CLOCK TICK TEST ***" );
     40      TEST_END();
    4141      rtems_test_exit( 0 );
    4242    }
  • testsuites/samples/unlimited/init.c

    r840ae71 r9391f6d  
    1919#include <stdlib.h>
    2020
     21const char rtems_test_name[] = "UNLIMITED TASK";
     22
    2123rtems_id task_id[MAX_TASKS];
    2224
     
    2931  uint32_t            task;
    3032
     33  TEST_BEGIN();
     34
    3135  /* lower the task priority to allow created tasks to execute */
    3236
     
    3438    RTEMS_SELF, RTEMS_MAXIMUM_PRIORITY - 1, &old_priority);
    3539  rtems_task_mode(RTEMS_PREEMPT,  RTEMS_PREEMPT_MASK, &old_mode);
    36 
    37   printf( "\n*** UNLIMITED TASK TEST ***\n" );
    3840
    3941  /*
     
    4850  test3();
    4951
    50   printf( "\n*** END OF UNLIMITED TASK TEST ***\n" );
     52  TEST_END();
    5153  exit( 0 );
    5254}
Note: See TracChangeset for help on using the changeset viewer.