From 2e2d4416e2d93e1349d467b347437539c4aaedab Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 7 Mar 2012 12:09:14 -0600 Subject: [PATCH] Add testsuite with single linking tests (link01) --- testsuite/Makefile | 11 +++++++++++ testsuite/link01/Makefile | 28 ++++++++++++++++++++++++++ testsuite/link01/test.c | 41 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 testsuite/Makefile create mode 100644 testsuite/link01/Makefile create mode 100644 testsuite/link01/test.c diff --git a/testsuite/Makefile b/testsuite/Makefile new file mode 100644 index 00000000..287ae979 --- /dev/null +++ b/testsuite/Makefile @@ -0,0 +1,11 @@ +# +# $Id$ +# + +include ../config.inc + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc +include $(RTEMS_CUSTOM) +include $(RTEMS_SHARE)/make/directory.cfg + +SUBDIRS=link01 diff --git a/testsuite/link01/Makefile b/testsuite/link01/Makefile new file mode 100644 index 00000000..ea484c31 --- /dev/null +++ b/testsuite/link01/Makefile @@ -0,0 +1,28 @@ +# +# $Id$ +# + +include ../../config.inc + +PGM=${ARCH}/link01.exe + +# optional managers required +MANAGERS=all + +# C source names +C_FILES = test.c +C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) + +AM_CPPFLAGS += -I $(INSTALL_BASE)/include +LINK_LIBS += $(INSTALL_BASE)/libbsd.a + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc +include $(RTEMS_CUSTOM) +include $(PROJECT_ROOT)/make/leaf.cfg + +OBJS= $(C_O_FILES) + +all: ${ARCH} $(PGM) + +$(PGM): $(OBJS) + $(make-exe) diff --git a/testsuite/link01/test.c b/testsuite/link01/test.c new file mode 100644 index 00000000..69293605 --- /dev/null +++ b/testsuite/link01/test.c @@ -0,0 +1,41 @@ +/* + * Simple test program -- simplified version of sample test hello. + * + * $Id$ + */ + +#include +#include +#include +#include + +int maxproc; +int ngroups_max; + +void prison_hold() {} +void prison_free() {} + +void rtems_interrupt_server_initialize(void) { } + +rtems_task Init( + rtems_task_argument ignored +) +{ + printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" ); + rtems_bsd_initialize_with_interrupt_server(); + printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" ); + exit( 0 ); +} + +/* configuration information */ + +/* NOTICE: the clock driver is explicitly disabled */ +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_MAXIMUM_TASKS 1 + +#define CONFIGURE_INIT +#include +/* end of file */