forked from Imagelibrary/rtems
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.
This commit is contained in:
2
testsuites/sptests/spcoverage/.cvsignore
Normal file
2
testsuites/sptests/spcoverage/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
29
testsuites/sptests/spcoverage/Makefile.am
Normal file
29
testsuites/sptests/spcoverage/Makefile.am
Normal file
@@ -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
|
||||
41
testsuites/sptests/spcoverage/init.c
Normal file
41
testsuites/sptests/spcoverage/init.c
Normal file
@@ -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 */
|
||||
25
testsuites/sptests/spcoverage/spcoverage.doc
Normal file
25
testsuites/sptests/spcoverage/spcoverage.doc
Normal file
@@ -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.
|
||||
3
testsuites/sptests/spcoverage/spcoverage.scn
Normal file
3
testsuites/sptests/spcoverage/spcoverage.scn
Normal file
@@ -0,0 +1,3 @@
|
||||
*** TEST COVERAGE MARKERS ***
|
||||
Init - If coverage enabled, call coverage marker methods
|
||||
*** END OF TEST COVERAGE MARKERS ***
|
||||
Reference in New Issue
Block a user