forked from Imagelibrary/rtems
2009-09-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, configure.ac: Add new test to exercise when notepads are not configured. * spnotepad01/.cvsignore, spnotepad01/Makefile.am, spnotepad01/init.c, spnotepad01/spnotepad01.doc, spnotepad01/spnotepad01.scn: New files.
This commit is contained in:
2
testsuites/sptests/spnotepad01/.cvsignore
Normal file
2
testsuites/sptests/spnotepad01/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
28
testsuites/sptests/spnotepad01/Makefile.am
Normal file
28
testsuites/sptests/spnotepad01/Makefile.am
Normal file
@@ -0,0 +1,28 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
MANAGERS = all
|
||||
|
||||
rtems_tests_PROGRAMS = spnotepad01
|
||||
spnotepad01_SOURCES = init.c
|
||||
|
||||
dist_rtems_tests_DATA = spnotepad01.scn
|
||||
dist_rtems_tests_DATA += spnotepad01.doc
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
spnotepad01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
|
||||
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
|
||||
|
||||
LINK_OBJS = $(spnotepad01_OBJECTS) $(spnotepad01_LDADD)
|
||||
LINK_LIBS = $(spnotepad01_LDLIBS)
|
||||
|
||||
spnotepad01$(EXEEXT): $(spnotepad01_OBJECTS) $(spnotepad01_DEPENDENCIES)
|
||||
@rm -f spnotepad01$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
57
testsuites/sptests/spnotepad01/init.c
Normal file
57
testsuites/sptests/spnotepad01/init.c
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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 status;
|
||||
uint32_t note;
|
||||
|
||||
puts( "\n\n*** TEST NOTEPADS DISABLED ***" );
|
||||
|
||||
puts( "Init - rtems_task_get_note - RTEMS_NOT_CONFIGURED" );
|
||||
status = rtems_task_get_note( rtems_task_self(), 0, ¬e );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_NOT_CONFIGURED,
|
||||
"rtems_task_get_note not configured"
|
||||
);
|
||||
|
||||
puts( "Init - rtems_task_set_note - RTEMS_NOT_CONFIGURED" );
|
||||
status = rtems_task_set_note( rtems_task_self(), 0, 1 );
|
||||
fatal_directive_status(
|
||||
status,
|
||||
RTEMS_NOT_CONFIGURED,
|
||||
"rtems_task_set_note not configured"
|
||||
);
|
||||
|
||||
puts( "*** END OF TEST NOTEPADS DISABLED ***" );
|
||||
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
|
||||
#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
26
testsuites/sptests/spnotepad01/spnotepad01.doc
Normal file
26
testsuites/sptests/spnotepad01/spnotepad01.doc
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# $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: spnotepad01
|
||||
|
||||
directives:
|
||||
|
||||
rtems_task_get_note
|
||||
rtems_task_set_note
|
||||
|
||||
concepts:
|
||||
|
||||
+ Ensure that the proper error code is returned by the notepad services
|
||||
when notepads are not configured.
|
||||
is less than the minimum. This is mainly to ensure that a branch is taken.
|
||||
|
||||
4
testsuites/sptests/spnotepad01/spnotepad01.scn
Normal file
4
testsuites/sptests/spnotepad01/spnotepad01.scn
Normal file
@@ -0,0 +1,4 @@
|
||||
*** TEST NOTEPADS DISABLED ***
|
||||
Init - rtems_task_get_note - RTEMS_NOT_CONFIGURED
|
||||
Init - rtems_task_set_note - RTEMS_NOT_CONFIGURED
|
||||
*** END OF TEST NOTEPADS DISABLED ***
|
||||
Reference in New Issue
Block a user