Changeset 6a0e434 in rtems-testing


Ignore:
Timestamp:
Oct 25, 2018, 7:17:33 PM (6 months ago)
Author:
Joel Sherrill <joel@…>
Branches:
8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
68b43cf
Parents:
66f053a
Message:

rtems-test-template: Update

Location:
rtems-test-template
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • rtems-test-template/mktest

    r66f053a r6a0e434  
    2424usage()
    2525{
    26   echo "$progname -s SOURCE -d DEST -D description -n NUMBER [-v]"
    27   echo "                   OR"
    28   echo "$progname -c -d DEST"
     26  echo "Usage: $progname arguments"
    2927cat <<EOF
     28where arguments are the following
     29
     30  -t template_dir      - (required) Directory with test templates
     31  -s source_template   - (required) Specific template to use
     32  -d DEST              - (required) Output directory for test
     33  -D description       - (required) test description string
     34  -n NUMBER            - (required) test number
     35  [-v]                 - (optional) enable verbose mode
     36
     37Example:
     38
     39.../mktest -t .../rtems-testing/rtems-test-template \\
     40           -s psxtmtest_unblocking_preempt \\
     41           -d psxtmEXAMPLE01 \\
     42           -n 01 \\
     43           -n "Example 01"
     44
    3045
    3146The first form is to generate a new test.
    32 The second form is to add the new test to CVS.
    3347EOF
    3448  exit 1
    3549}
    3650
    37 addToCVS=no
    3851source=
    3952dest=
    4053desc=
     54templateDir=NOT_SET
    4155testNum=
    4256verbose=no
    43 while getopts cd:D:s:n:v OPT
     57while getopts d:D:s:t:n:v OPT
    4458do
    4559  case "$OPT" in
    46     c) addToCVS=`toggle ${addToCVS}` ;;
    4760    d) dest=$OPTARG ;;
    4861    D) desc=$OPTARG ;;
    4962    s) source=$OPTARG ;;
    5063    n) testNum=$OPTARG ;;
     64    t) templateDir=$OPTARG ;;
    5165    v) verbose=`toggle ${verbose}` ;;
    5266    *) usage ;;
     
    6074check_status $? Not in test suite directory
    6175
    62 
    63 if [ ${addToCVS} == yes ] ; then
    64   test -d ${dest}
    65   check_status $? "Cannot add ${dest} -- does not exist"
    66 
    67   cvs add ${dest}
    68   cd ${dest}
    69   for f in `ls -1 .cvsignore Makefile.am *.doc *.scn *.[ch] 2>/dev/null`
    70   do
    71      cvs add -kkv ${f}
    72   done
    73   exit 0
    74 fi
     76test "${templateDir}" != "NOT_SET"
     77check_status $? No test template directory provided
     78test -d "${templateDir}"
     79check_status $? ${templateDir} is not a directory
    7580
    7681test "X${source}" != "X"
    7782check_status $? No source provided
    78 test -d "${source}"
     83test -d "${templateDir}/${source}"
    7984check_status $? Source directory not present
    8085test "X${testNum}" != "X"
    8186check_status $? No test number provided
    82 
    83 test ! -d ${dest}/CVS
    84 check_status $? "Are you sure about ${dest}? Already a CVS directory in it"
    8587
    8688let $((shiftcount = $OPTIND - 1))
     
    100102
    101103# all the source code we know about
    102 for s in ${source}/*
     104for s in ${templateDir}/${source}/*
    103105do
    104106  if [ -r ${s} -a ! -d ${s} ] ; then
     
    115117done
    116118
    117 cat <<EOF >${dest}/.cvsignore
    118 Makefile
    119 Makefile.in
    120 EOF
    121 
    122119cat <<EOF
    123120You need to add the test to the Makefile.am and configure.ac by hand
  • rtems-test-template/psxtest/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    88 */
    99
    10 #include <tmacros.h>
    1110#include "test_support.h"
     11
     12const char rtems_test_name[] = "@UPPER@";
    1213
    1314/* forward declarations to avoid warnings */
     
    1819)
    1920{
    20   puts( "\n\n*** POSIX TEST @UPPER@ ***" );
     21  TEST_BEGIN();
    2122
    2223  /* XXX test code goes here */
    2324
    24   puts( "*** END OF POSIX TEST @UPPER@ ***" );
     25  TEST_END();
    2526
    2627  rtems_test_exit(0);
     
    3233#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    3334
    34 #define CONFIGURE_MAXIMUM_POSIX_THREADS        2
     35#define CONFIGURE_MAXIMUM_POSIX_THREADS        1
    3536
    3637#define CONFIGURE_POSIX_INIT_THREAD_TABLE
     38
     39#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
    3740
    3841#define CONFIGURE_INIT
  • rtems-test-template/psxtest_with_thread/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    5050#define CONFIGURE_POSIX_INIT_THREAD_TABLE
    5151
     52#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     53
    5254#define CONFIGURE_INIT
    5355#include <rtems/confdefs.h>
  • rtems-test-template/psxtmtest_blocking/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <timesys.h>
    15 #include <tmacros.h>
    16 #include <rtems/timerdrv.h>
     15#include <rtems/btimer.h>
    1716#include "test_support.h"
    1817
  • rtems-test-template/psxtmtest_init_destroy/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <timesys.h>
    15 #include <rtems/timerdrv.h>
     15#include <rtems/btimer.h>
    1616#include "test_support.h"
     17
     18const char rtems_test_name[] = "@UPPER@";""
    1719
    1820/* forward declarations to avoid warnings */
     
    6870{
    6971
    70   puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" );
     72  TEST_BEGIN();
    7173
    7274  /* XXX any required initialization goes here */
     
    7577  benchmark_NAME_OF_DELETE_OPERATION();
    7678
    77   puts( "*** END OF POSIX TIME TEST @UPPER@ ***" );
     79  TEST_END();
    7880  rtems_test_exit(0);
    7981}
  • rtems-test-template/psxtmtest_single/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1313
    1414#include <timesys.h>
    15 #include <rtems/timerdrv.h>
     15#include <rtems/btimer.h>
    1616#include "test_support.h"
     17
     18const char rtems_test_name[] = "@UPPER@";""
    1719
    1820/* forward declarations to avoid warnings */
     
    4648{
    4749
    48   puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" );
     50  TEST_BEGIN();
    4951
    5052  /* XXX any required initialization goes here */
     
    5254  benchmark_NAME_OF_OPERATION();
    5355
    54   puts( "*** END OF POSIX TIME TEST @UPPER@ ***" );
     56  TEST_END();
    5557  rtems_test_exit(0);
    5658}
  • rtems-test-template/psxtmtest_unblocking_nopreempt/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1212#endif
    1313
    14 #include <coverhd.h>
    15 #include <tmacros.h>
    1614#include <timesys.h>
    1715#include "test_support.h"
    1816#include <pthread.h>
    1917#include <sched.h>
    20 #include <rtems/timerdrv.h>
     18#include <rtems/btimer.h>
     19
     20const char rtems_test_name[] = "@UPPER@";""
    2121
    2222/* forward declarations to avoid warnings */
     
    4545  long       end_time;
    4646
    47   puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" );
     47  TEST_BEGIN();
    4848
    4949  status = pthread_create( &threadId, NULL, Blocker, NULL );
     
    8383  );
    8484
    85   puts( "*** END OF POSIX TIME TEST @UPPER@ ***" );
     85  TEST_END();
    8686  rtems_test_exit( 0 );
    8787
  • rtems-test-template/psxtmtest_unblocking_preempt/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1212#endif
    1313
    14 #include <coverhd.h>
    15 #include <tmacros.h>
    1614#include <timesys.h>
    1715#include "test_support.h"
    1816#include <pthread.h>
    1917#include <sched.h>
    20 #include <rtems/timerdrv.h>
     18#include <rtems/btimer.h>
     19
     20const char rtems_test_name[] = "@UPPER@";""
    2121
    2222/* forward declarations to avoid warnings */
     
    4747  );
    4848
    49   puts( "*** END OF POSIX TIME TEST @UPPER@ ***" );
     49  TEST_END();
    5050  rtems_test_exit( 0 );
    5151  return NULL;
     
    8383  struct sched_param  param;
    8484
    85   puts( "\n\n*** POSIX TIME TEST @UPPER@ ***" );
     85  TEST_BEGIN();
    8686
    8787  /*
  • rtems-test-template/smptest/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    88 */
    99
    10 #include <tmacros.h>
    1110#include "test_support.h"
     11
     12const char rtems_test_name[] = "@UPPER@";
    1213
    1314/* forward declarations to avoid warnings */
     
    3233  rtems_status_code  status;
    3334
    34   puts( "\n\n*** TEST @UPPER@ ***" );
     35  TEST_BEGIN();
    3536
    3637  for ( i=0; i<_SMP_Processor_count-1; i++ ) {
     
    5657  /* XXX something goes here */
    5758
    58   puts( "*** END OF TEST @UPPER@ ***" );
     59  TEST_END();
    5960  rtems_test_exit(0);
    6061}
     
    6566#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    6667
    67 #define CONFIGURE_SMP_APPLICATION
    6868#define CONFIGURE_SMP_MAXIMUM_PROCESSORS   2
    6969
     
    7272#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    7373
     74#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     75
    7476#define CONFIGURE_INIT
    75 
    7677#include <rtems/confdefs.h>
    7778/* end of file */
  • rtems-test-template/spfatal/testcase.h

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
  • rtems-test-template/sptest/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1111#include "test_support.h"
    1212
     13const char rtems_test_name[] = "@UPPER@";
     14
    1315/* forward declarations to avoid warnings */
    1416rtems_task Init(rtems_task_argument argument);
     
    1820)
    1921{
    20   puts( "\n\n*** TEST @UPPER@ ***" );
     22  TEST_BEGIN();
    2123
    2224  /* XXX test code goes here */
    2325
    24   puts( "*** END OF TEST @UPPER@ ***" );
     26  TEST_END();
    2527
    2628  rtems_test_exit(0);
     
    3537#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    3638
     39#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     40
    3741#define CONFIGURE_INIT
    38 
    3942#include <rtems/confdefs.h>
    4043/* end of file */
  • rtems-test-template/sptest_operation_from_tsr/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    99
    1010#include <tmacros.h>
     11
     12const char rtems_test_name[] = "@UPPER@";
    1113
    1214/* forward declarations to avoid warnings */
     
    3638  rtems_id              timer;
    3739
    38   puts( "\n\n*** TEST @UPPER@ ***" );
     40  TEST_BEGIN();
    3941
    4042  /*
     
    7375
    7476  puts( "Operation from ISR successfully processed" );
    75   puts( "*** END OF TEST @UPPER@ ***" );
     77  TEST_END();
    7678  rtems_test_exit( 0 );
    7779}
     
    8789#define CONFIGURE_MAXIMUM_TIMERS            1
    8890
     91#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     92
    8993#define CONFIGURE_INIT
    9094#include <rtems/confdefs.h>
  • rtems-test-template/sptest_with_task/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1010#include <tmacros.h>
    1111#include "test_support.h"
     12
     13const char rtems_test_name[] = "@UPPER@";
    1214
    1315/* forward declarations to avoid warnings */
     
    2931  rtems_id          task_id;
    3032
    31   puts( "\n\n*** TEST @UPPER@ ***" );
     33  TEST_BEGIN();
    3234
    3335  status = rtems_task_create(
     
    4446  directive_failed( status, "rtems_task_start" );
    4547
    46   puts( "*** END OF TEST @UPPER@ ***" );
     48  TEST_END();
    4749  rtems_test_exit(0);
    4850}
     
    5658#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    5759
     60#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     61
    5862#define CONFIGURE_INIT
    59 
    6063#include <rtems/confdefs.h>
    6164/* end of file */
  • rtems-test-template/tmtest/init.c

    r66f053a r6a0e434  
    11/*
    2  *  COPYRIGHT (c) 1989-2013.
     2 *  COPYRIGHT (c) 1989-2018.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    88 */
    99
    10 #include <coverhd.h>
    11 #include <tmacros.h>
    1210#include <timesys.h>
    1311#include "test_support.h"
Note: See TracChangeset for help on using the changeset viewer.