diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-21 19:32:30 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-21 19:32:30 +0000 |
commit | bd894e544719b754168b48a0551553e4ac79fabd (patch) | |
tree | c4cfa00c550c42d83422aab7dcbc828345b4db6d | |
parent | 2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-bd894e544719b754168b48a0551553e4ac79fabd.tar.bz2 |
2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: Add new test to exercise Debug Manager.
* sp10/.cvsignore, sp10/Makefile.am, sp10/init.c, sp10/sp10.doc,
sp10/sp10.scn: New files.
-rw-r--r-- | testsuites/sptests/ChangeLog | 6 | ||||
-rw-r--r-- | testsuites/sptests/Makefile.am | 2 | ||||
-rw-r--r-- | testsuites/sptests/configure.ac | 1 | ||||
-rw-r--r-- | testsuites/sptests/sp10/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp10/Makefile.am | 28 | ||||
-rw-r--r-- | testsuites/sptests/sp10/init.c | 61 | ||||
-rw-r--r-- | testsuites/sptests/sp10/sp10.doc | 24 | ||||
-rw-r--r-- | testsuites/sptests/sp10/sp10.scn | 8 |
8 files changed, 131 insertions, 1 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 1bf2d6a9ba..208672eb8f 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,11 @@ 2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com> + * Makefile.am, configure.ac: Add new test to exercise Debug Manager. + * sp10/.cvsignore, sp10/Makefile.am, sp10/init.c, sp10/sp10.doc, + sp10/sp10.scn: New files. + +2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com> + * spintrcritical06/init.c: Clean up. * spintrcritical09/init.c: Adjust clock tick so it works on erc32. * spintrcritical09/spintrcritical09.scn: Fill in. diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index 7f7dc46787..e65b241b84 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal ## deleted over the years. SUBDIRS = \ sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 \ - sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp19 \ + sp10 sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp19 \ sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp27a sp28 sp29 \ sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 sp39 \ sp40 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \ diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index c9c1d5edd4..e13234b499 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -35,6 +35,7 @@ sp06/Makefile sp07/Makefile sp08/Makefile sp09/Makefile +sp10/Makefile sp11/Makefile sp12/Makefile sp13/Makefile diff --git a/testsuites/sptests/sp10/.cvsignore b/testsuites/sptests/sp10/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp10/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp10/Makefile.am b/testsuites/sptests/sp10/Makefile.am new file mode 100644 index 0000000000..c5fba4d46a --- /dev/null +++ b/testsuites/sptests/sp10/Makefile.am @@ -0,0 +1,28 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp10 +sp10_SOURCES = init.c + +dist_rtems_tests_DATA = sp10.scn +dist_rtems_tests_DATA += sp10.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +sp10_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel) + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sp10_OBJECTS) $(sp10_LDADD) +LINK_LIBS = $(sp10_LDLIBS) + +sp10$(EXEEXT): $(sp10_OBJECTS) $(sp10_DEPENDENCIES) + @rm -f sp10$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp10/init.c b/testsuites/sptests/sp10/init.c new file mode 100644 index 0000000000..5ca4a450fc --- /dev/null +++ b/testsuites/sptests/sp10/init.c @@ -0,0 +1,61 @@ +/* + * COPYRIGHT (c) 1989-2009. + * 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> + +rtems_task Init( + rtems_task_argument ignored +) +{ + rtems_status_code sc; + bool is_set; + + puts( "\n\n*** TEST 10 ***" ); + + puts( "Init - clear debug level" ); + _Debug_Level = 0; + + puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" ); + is_set = rtems_debug_is_enabled( 0x1 ); + rtems_test_assert(is_set == false); + + puts( "Init - rtems_debug_enable - set 0x1" ); + rtems_debug_enable(0x1); + rtems_test_assert(_Debug_Level == 0x1); + + puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" ); + is_set = rtems_debug_is_enabled( 0x1 ); + rtems_test_assert(is_set == true); + + puts( "Init - rtems_debug_disable - clear 0x1" ); + rtems_debug_disable(0x1); + rtems_test_assert(_Debug_Level == 0x0); + + puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" ); + is_set = rtems_debug_is_enabled( 0x1 ); + rtems_test_assert(is_set == false); + + puts( "*** END OF TEST 10 ***" ); + rtems_test_exit(0); +} + +/* configuration information */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 1 +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT +#include <rtems/confdefs.h> + +/* global variables */ diff --git a/testsuites/sptests/sp10/sp10.doc b/testsuites/sptests/sp10/sp10.doc new file mode 100644 index 0000000000..c9f9545ebe --- /dev/null +++ b/testsuites/sptests/sp10/sp10.doc @@ -0,0 +1,24 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-2009. +# 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: sp10 + +directives: + + rtems_debug_enable + rtems_debug_disable + rtems_debug_is_enabled + +concepts: + ++ Exercise the Debug Manager. diff --git a/testsuites/sptests/sp10/sp10.scn b/testsuites/sptests/sp10/sp10.scn new file mode 100644 index 0000000000..368743407f --- /dev/null +++ b/testsuites/sptests/sp10/sp10.scn @@ -0,0 +1,8 @@ +*** TEST 10 *** +Init - clear debug level +Init - rtems_debug_is_enabled - is 0x1 set? No +Init - rtems_debug_enable - set 0x1 +Init - rtems_debug_is_enabled - is 0x1 set? Yes +Init - rtems_debug_disable - clear 0x1 +Init - rtems_debug_is_enabled - is 0x1 set? No +*** END OF TEST 10 *** |