summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-11 17:53:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-11 17:53:09 +0000
commitc8ce0825648a2f084253c4c43af2c5fb4f164a03 (patch)
treee5d3393ff686a00cb2ccb5bf3d435aa10cd77955
parent2009-08-11 Josh Switnicki <josh.switnicki@utoronto.ca> (diff)
downloadrtems-c8ce0825648a2f084253c4c43af2c5fb4f164a03.tar.bz2
2009-08-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac, sp62/init.c, sp64/init.c: Add new test and adjust existing for alignment. New test ensures coverage begin and end marker methods are exercised so they do not get considered unexecuted. * spcoverage/.cvsignore, spcoverage/Makefile.am, spcoverage/init.c, spcoverage/spcoverage.doc, spcoverage/spcoverage.scn: New files.
-rw-r--r--testsuites/sptests/ChangeLog9
-rw-r--r--testsuites/sptests/Makefile.am4
-rw-r--r--testsuites/sptests/configure.ac2
-rw-r--r--testsuites/sptests/sp62/init.c2
-rw-r--r--testsuites/sptests/sp64/init.c4
-rw-r--r--testsuites/sptests/spcoverage/.cvsignore2
-rw-r--r--testsuites/sptests/spcoverage/Makefile.am29
-rw-r--r--testsuites/sptests/spcoverage/init.c41
-rw-r--r--testsuites/sptests/spcoverage/spcoverage.doc25
-rw-r--r--testsuites/sptests/spcoverage/spcoverage.scn3
10 files changed, 115 insertions, 6 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog
index afc876899a..5fb7c47754 100644
--- a/testsuites/sptests/ChangeLog
+++ b/testsuites/sptests/ChangeLog
@@ -1,3 +1,12 @@
+2009-08-11 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * Makefile.am, configure.ac, sp62/init.c, sp64/init.c: Add new test and
+ adjust existing for alignment. New test ensures coverage begin and
+ end marker methods are exercised so they do not get considered
+ unexecuted.
+ * spcoverage/.cvsignore, spcoverage/Makefile.am, spcoverage/init.c,
+ spcoverage/spcoverage.doc, spcoverage/spcoverage.scn: New files.
+
2009-08-10 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: Add new test to exercise legacy
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index e5c1fef327..e85dea6d89 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -14,8 +14,8 @@ SUBDIRS = \
sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \
sp50 sp51 sp52 sp53 sp54 sp55 sp56 sp57 sp58 sp59 \
sp60 sp61 sp62 sp63 sp64 \
- spchain spclockget spobjgetnext spprintk spsize spstkalloc spthreadq01 \
- spwatchdog spwkspace \
+ spchain spclockget spcoverage spobjgetnext spprintk spsize \
+ spstkalloc spthreadq01 spwatchdog spwkspace \
spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 \
spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 524ff966ec..88a9746c37 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -23,7 +23,6 @@ RTEMS_CANONICALIZE_TOOLS
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
sp01/Makefile
@@ -93,6 +92,7 @@ sp63/Makefile
sp64/Makefile
spchain/Makefile
spclockget/Makefile
+spcoverage/Makefile
spfatal01/Makefile
spfatal02/Makefile
spfatal03/Makefile
diff --git a/testsuites/sptests/sp62/init.c b/testsuites/sptests/sp62/init.c
index 0a8f595685..e352de8464 100644
--- a/testsuites/sptests/sp62/init.c
+++ b/testsuites/sptests/sp62/init.c
@@ -12,7 +12,7 @@
#include <tmacros.h>
rtems_id Region;
-uint32_t Region_Memory[256];
+uint32_t Region_Memory[256] CPU_STRUCTURE_ALIGNMENT;
volatile bool case_hit;
#define FIRST_ALLOC 980
diff --git a/testsuites/sptests/sp64/init.c b/testsuites/sptests/sp64/init.c
index 65544f34dd..6b6d6f2018 100644
--- a/testsuites/sptests/sp64/init.c
+++ b/testsuites/sptests/sp64/init.c
@@ -11,8 +11,8 @@
#include "tmacros.h"
-uint32_t Area1[50];
-uint32_t Area2[50];
+uint32_t Area1[50] CPU_STRUCTURE_ALIGNMENT;
+uint32_t Area2[50] CPU_STRUCTURE_ALIGNMENT;
rtems_task Init(
rtems_task_argument ignored
diff --git a/testsuites/sptests/spcoverage/.cvsignore b/testsuites/sptests/spcoverage/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/testsuites/sptests/spcoverage/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/testsuites/sptests/spcoverage/Makefile.am b/testsuites/sptests/spcoverage/Makefile.am
new file mode 100644
index 0000000000..e7b5e82889
--- /dev/null
+++ b/testsuites/sptests/spcoverage/Makefile.am
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spcoverage
+spcoverage_SOURCES = init.c
+
+dist_rtems_tests_DATA = spcoverage.scn
+dist_rtems_tests_DATA += spcoverage.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+spcoverage_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spcoverage_OBJECTS) $(spcoverage_LDADD)
+LINK_LIBS = $(spcoverage_LDLIBS)
+
+spcoverage$(EXEEXT): $(spcoverage_OBJECTS) $(spcoverage_DEPENDENCIES)
+ @rm -f spcoverage$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/spcoverage/init.c b/testsuites/sptests/spcoverage/init.c
new file mode 100644
index 0000000000..631b7b7392
--- /dev/null
+++ b/testsuites/sptests/spcoverage/init.c
@@ -0,0 +1,41 @@
+/*
+ * 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
+)
+{
+ puts( "\n\n*** TEST COVERAGE MARKERS ***" );
+
+ puts( "Init - If coverage enabled, call coverage marker methods" );
+ #if defined(RTEMS_COVERAGE)
+ start_coverage();
+ end_coverage();
+ #endif
+
+ puts( "*** END OF TEST COVERAGE MARKERS ***" );
+ 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/spcoverage/spcoverage.doc b/testsuites/sptests/spcoverage/spcoverage.doc
new file mode 100644
index 0000000000..8e353b7c53
--- /dev/null
+++ b/testsuites/sptests/spcoverage/spcoverage.doc
@@ -0,0 +1,25 @@
+#
+# $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: spcoverage
+
+directives:
+
+ start_coverage
+ end_coverage
+
+
+concepts:
+
++ Ensure that the special empty methods used to mark the beginning and
+ end of the code being coverage tested is executed also.
diff --git a/testsuites/sptests/spcoverage/spcoverage.scn b/testsuites/sptests/spcoverage/spcoverage.scn
new file mode 100644
index 0000000000..a65ca5fb74
--- /dev/null
+++ b/testsuites/sptests/spcoverage/spcoverage.scn
@@ -0,0 +1,3 @@
+*** TEST COVERAGE MARKERS ***
+Init - If coverage enabled, call coverage marker methods
+*** END OF TEST COVERAGE MARKERS ***