forked from Imagelibrary/rtems
2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add test for rtems_print_buffer(). * dumpbuf01/.cvsignore, dumpbuf01/Makefile.am, dumpbuf01/dumpbuf01.doc, dumpbuf01/dumpbuf01.scn, dumpbuf01/init.c: New files.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac: Add test for rtems_print_buffer().
|
||||
* dumpbuf01/.cvsignore, dumpbuf01/Makefile.am, dumpbuf01/dumpbuf01.doc,
|
||||
dumpbuf01/dumpbuf01.scn, dumpbuf01/init.c: New files.
|
||||
|
||||
2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* bspcmdline01/bspcmdline01.scn, bspcmdline01/init.c: Add test cases to
|
||||
|
||||
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
|
||||
SUBDIRS = POSIX
|
||||
|
||||
SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \
|
||||
devnullfatal01 gxx01 gxx02 \
|
||||
devnullfatal01 dumpbuf01 gxx01 gxx02 \
|
||||
malloctest malloc02 malloc03 malloc04 malloc05 heapwalk \
|
||||
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
|
||||
termios termios01 termios02 termios03 termios04 termios05 \
|
||||
|
||||
@@ -54,6 +54,7 @@ devfs02/Makefile
|
||||
devfs03/Makefile
|
||||
devfs04/Makefile
|
||||
devnullfatal01/Makefile
|
||||
dumpbuf01/Makefile
|
||||
gxx01/Makefile
|
||||
gxx02/Makefile
|
||||
heapwalk/Makefile
|
||||
|
||||
2
testsuites/libtests/dumpbuf01/.cvsignore
Normal file
2
testsuites/libtests/dumpbuf01/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
26
testsuites/libtests/dumpbuf01/Makefile.am
Normal file
26
testsuites/libtests/dumpbuf01/Makefile.am
Normal file
@@ -0,0 +1,26 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = dumpbuf01
|
||||
dumpbuf01_SOURCES = init.c
|
||||
|
||||
dist_rtems_tests_DATA = dumpbuf01.scn
|
||||
dist_rtems_tests_DATA += dumpbuf01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(dumpbuf01_OBJECTS) $(dumpbuf01_LDADD)
|
||||
LINK_LIBS = $(dumpbuf01_LDLIBS)
|
||||
|
||||
dumpbuf01$(EXEEXT): $(dumpbuf01_OBJECTS) $(dumpbuf01_DEPENDENCIES)
|
||||
@rm -f dumpbuf01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
22
testsuites/libtests/dumpbuf01/dumpbuf01.doc
Normal file
22
testsuites/libtests/dumpbuf01/dumpbuf01.doc
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-2010.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.com/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: dumpbuf01
|
||||
|
||||
directives:
|
||||
|
||||
rtems_print_buffer
|
||||
|
||||
concepts:
|
||||
|
||||
+ Fully exercise rtems_print_buffer and provide full coverage of all paths.
|
||||
189
testsuites/libtests/dumpbuf01/dumpbuf01.scn
Normal file
189
testsuites/libtests/dumpbuf01/dumpbuf01.scn
Normal file
@@ -0,0 +1,189 @@
|
||||
*** TEST DUMPBUF01 ***
|
||||
====== Printing 0 Bytes ======
|
||||
===============================
|
||||
|
||||
====== Printing 1 Bytes ======
|
||||
41 |A |
|
||||
===============================
|
||||
|
||||
====== Printing 2 Bytes ======
|
||||
41 42 |AB |
|
||||
===============================
|
||||
|
||||
====== Printing 3 Bytes ======
|
||||
41 42 43 |ABC |
|
||||
===============================
|
||||
|
||||
====== Printing 4 Bytes ======
|
||||
41 42 43 44 |ABCD |
|
||||
===============================
|
||||
|
||||
====== Printing 5 Bytes ======
|
||||
41 42 43 44 45 |ABCDE |
|
||||
===============================
|
||||
|
||||
====== Printing 6 Bytes ======
|
||||
41 42 43 44 45 46 |ABCDEF |
|
||||
===============================
|
||||
|
||||
====== Printing 7 Bytes ======
|
||||
41 42 43 44 45 46 47 |ABCDEFG |
|
||||
===============================
|
||||
|
||||
====== Printing 8 Bytes ======
|
||||
41 42 43 44 45 46 47 48 |ABCDEFGH |
|
||||
===============================
|
||||
|
||||
====== Printing 9 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 |ABCDEFGHI |
|
||||
===============================
|
||||
|
||||
====== Printing 10 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a |ABCDEFGHIJ |
|
||||
===============================
|
||||
|
||||
====== Printing 11 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b |ABCDEFGHIJK |
|
||||
===============================
|
||||
|
||||
====== Printing 12 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c |ABCDEFGHIJKL |
|
||||
===============================
|
||||
|
||||
====== Printing 13 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d |ABCDEFGHIJKLM |
|
||||
===============================
|
||||
|
||||
====== Printing 14 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e |ABCDEFGHIJKLMN |
|
||||
===============================
|
||||
|
||||
====== Printing 15 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f |ABCDEFGHIJKLMNO |
|
||||
===============================
|
||||
|
||||
====== Printing 16 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
===============================
|
||||
|
||||
====== Printing 17 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 |Q |
|
||||
===============================
|
||||
|
||||
====== Printing 18 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 |QR |
|
||||
===============================
|
||||
|
||||
====== Printing 19 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 |QRS |
|
||||
===============================
|
||||
|
||||
====== Printing 20 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 |QRST |
|
||||
===============================
|
||||
|
||||
====== Printing 21 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 |QRSTU |
|
||||
===============================
|
||||
|
||||
====== Printing 22 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 |QRSTUV |
|
||||
===============================
|
||||
|
||||
====== Printing 23 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 |QRSTUVW |
|
||||
===============================
|
||||
|
||||
====== Printing 24 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 |QRSTUVWX |
|
||||
===============================
|
||||
|
||||
====== Printing 25 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 |QRSTUVWXY |
|
||||
===============================
|
||||
|
||||
====== Printing 26 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a |QRSTUVWXYZ |
|
||||
===============================
|
||||
|
||||
====== Printing 27 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 |QRSTUVWXYZ0 |
|
||||
===============================
|
||||
|
||||
====== Printing 28 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 |QRSTUVWXYZ01 |
|
||||
===============================
|
||||
|
||||
====== Printing 29 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 |QRSTUVWXYZ012 |
|
||||
===============================
|
||||
|
||||
====== Printing 30 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 |QRSTUVWXYZ0123 |
|
||||
===============================
|
||||
|
||||
====== Printing 31 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 |QRSTUVWXYZ01234 |
|
||||
===============================
|
||||
|
||||
====== Printing 32 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
===============================
|
||||
|
||||
====== Printing 33 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
36 |6 |
|
||||
===============================
|
||||
|
||||
====== Printing 34 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
36 37 |67 |
|
||||
===============================
|
||||
|
||||
====== Printing 35 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
36 37 38 |678 |
|
||||
===============================
|
||||
|
||||
====== Printing 36 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
36 37 38 39 |6789 |
|
||||
===============================
|
||||
|
||||
====== Printing 37 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
36 37 38 39 30 |67890 |
|
||||
===============================
|
||||
|
||||
====== Printing 38 Bytes ======
|
||||
41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
|
||||
51 52 53 54 55 56 57 58 59 5a 30 31 32 33 34 35 |QRSTUVWXYZ012345|
|
||||
36 37 38 39 30 0a |67890. |
|
||||
===============================
|
||||
|
||||
====== Printing -1 Bytes ======
|
||||
| |
|
||||
===============================
|
||||
|
||||
*** END OF TEST DUMPBUF01 ***
|
||||
57
testsuites/libtests/dumpbuf01/init.c
Normal file
57
testsuites/libtests/dumpbuf01/init.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
#include "test_support.h"
|
||||
#include <rtems/dumpbuf.h>
|
||||
|
||||
unsigned char Buffer[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\n";
|
||||
|
||||
void do_test(
|
||||
int length
|
||||
)
|
||||
{
|
||||
printf( "====== Printing %d Bytes ======\n", length );
|
||||
rtems_print_buffer( Buffer, length );
|
||||
printf( "===============================\n\n" );
|
||||
}
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
int i;
|
||||
|
||||
puts( "\n\n*** TEST DUMPBUF01 ***" );
|
||||
|
||||
for ( i = 0 ; i < sizeof(Buffer) ; i++ ) {
|
||||
do_test( i );
|
||||
}
|
||||
do_test( -1 );
|
||||
|
||||
puts( "*** END OF TEST DUMPBUF01 ***" );
|
||||
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
/* end of file */
|
||||
Reference in New Issue
Block a user