From e12ba0e4f07e5fda4219541ea7afdf6aa4833238 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 10 May 2004 15:59:59 +0000 Subject: 2004-05-10 Ralf Corsepius * iostream/Makefile.am, iostream/init.cc, iostream/iostream.doc, iostream/iostream.scn, iostream/system.h: New (C++ variant of hello). --- testsuites/samples/ChangeLog | 6 +++++ testsuites/samples/iostream/.cvsignore | 2 ++ testsuites/samples/iostream/Makefile.am | 42 ++++++++++++++++++++++++++++++++ testsuites/samples/iostream/init.cc | 36 +++++++++++++++++++++++++++ testsuites/samples/iostream/iostream.doc | 12 +++++++++ testsuites/samples/iostream/iostream.scn | 3 +++ testsuites/samples/iostream/system.h | 38 +++++++++++++++++++++++++++++ 7 files changed, 139 insertions(+) create mode 100644 testsuites/samples/iostream/.cvsignore create mode 100644 testsuites/samples/iostream/Makefile.am create mode 100644 testsuites/samples/iostream/init.cc create mode 100644 testsuites/samples/iostream/iostream.doc create mode 100644 testsuites/samples/iostream/iostream.scn create mode 100644 testsuites/samples/iostream/system.h (limited to 'testsuites') diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog index 7626befdaf..da36b1104b 100644 --- a/testsuites/samples/ChangeLog +++ b/testsuites/samples/ChangeLog @@ -1,3 +1,9 @@ +2004-05-10 Ralf Corsepius + + * iostream/Makefile.am, iostream/init.cc, iostream/iostream.doc, + iostream/iostream.scn, iostream/system.h: + New (C++ variant of hello). + 2004-04-01 Ralf Corsepius * base_mp/system.h: Include instead of . diff --git a/testsuites/samples/iostream/.cvsignore b/testsuites/samples/iostream/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/samples/iostream/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/samples/iostream/Makefile.am b/testsuites/samples/iostream/Makefile.am new file mode 100644 index 0000000000..333b4b648e --- /dev/null +++ b/testsuites/samples/iostream/Makefile.am @@ -0,0 +1,42 @@ +## +## $Id$ +## + +SAMPLE = iostream +PGM = ${ARCH}/$(SAMPLE).exe + +MANAGERS = io + +CC_FILES = init.cc +CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.$(OBJEXT)) + +H_FILES = system.h +noinst_HEADERS = $(H_FILES) + +DOCTYPES = doc scn +DOCS = $(DOCTYPES:%=$(SAMPLE).%) + +SRCS = $(DOCS) $(CC_FILES) $(H_FILES) +OBJS = $(CC_O_FILES) + +PRINT_SRCS = $(DOCS) + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am +include $(top_srcdir)/sample.am + +# +# (OPTIONAL) Add local stuff here using += +# + +all-local: $(TMPINSTALL_FILES) + +${PGM}: $(OBJS) $(LINK_FILES) + $(make-cxx-exe) + +EXTRA_DIST = $(C_FILES) $(DOCS) + +CLEANFILES = $(TMPINSTALL_FILES) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc new file mode 100644 index 0000000000..6ecf2f3c88 --- /dev/null +++ b/testsuites/samples/iostream/init.cc @@ -0,0 +1,36 @@ +/* Init + * + * This routine is the initialization task for this test program. + * It is called from init_exec and has the responsibility for creating + * and starting the tasks that make up the test. If the time of day + * clock is required for the test, it should also be set to a known + * value by this function. + * + * Input parameters: NONE + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989-1999. + * 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$ + */ + +#define CONFIGURE_INIT +#include "system.h" + +#include + +rtems_task Init( + rtems_task_argument ignored +) +{ + std::cout << "\n\n*** HELLO WORLD TEST ***" << std::endl; + std::cout << "Hello World" << std::endl; + std::cout << "*** END OF HELLO WORLD TEST ***" << std::endl; + exit( 0 ); +} diff --git a/testsuites/samples/iostream/iostream.doc b/testsuites/samples/iostream/iostream.doc new file mode 100644 index 0000000000..5c0baceb8d --- /dev/null +++ b/testsuites/samples/iostream/iostream.doc @@ -0,0 +1,12 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989-1999. +# 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. +# + + diff --git a/testsuites/samples/iostream/iostream.scn b/testsuites/samples/iostream/iostream.scn new file mode 100644 index 0000000000..d9e92d81d5 --- /dev/null +++ b/testsuites/samples/iostream/iostream.scn @@ -0,0 +1,3 @@ +*** HELLO WORLD TEST *** +Hello World +*** END OF HELLO WORLD TEST *** diff --git a/testsuites/samples/iostream/system.h b/testsuites/samples/iostream/system.h new file mode 100644 index 0000000000..e738b1a631 --- /dev/null +++ b/testsuites/samples/iostream/system.h @@ -0,0 +1,38 @@ +/* system.h + * + * This include file contains information that is included in every + * function in the test set. + * + * COPYRIGHT (c) 1989-1999. + * 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 + +/* functions */ + +rtems_task Init( + rtems_task_argument argument +); + +/* configuration information */ + +#include /* for device driver prototypes */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 1 + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM + +#include + +/* end of include file */ -- cgit v1.2.3