link01 - Clean up and split so initialization can be reused in other tests

Removed building link_r since we appear to have managed to resolve
not pulling in enough of the FreeBSD source or having adequate
adapter routines.
This commit is contained in:
Joel Sherrill 2012-07-26 07:18:19 -05:00
parent 2c3d8b981b
commit e717e81793
3 changed files with 23 additions and 31 deletions

View File

@ -1,31 +0,0 @@
#
# $Id$
#
include ../../config.inc
PGM=${ARCH}/link01_r.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 -Wl,-r
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
OBJS= $(C_O_FILES)
CLEAN_ADDITIONS += undefined.txt
all: ${ARCH} $(PGM)
$(PGM): $(OBJS)
$(make-exe)
# @test `cat undefined.txt | wc -l` -ne 0 && exit 1

View File

@ -0,0 +1,23 @@
/*
* This is the body of the test. It does not do much except ensure
* that the target is alive after initializing the TCP/IP stack.
*/
#include <bsp.h>
#include <stdlib.h>
#include <stdio.h>
#include <freebsd/bsd.h>
void print_test_name(void)
{
printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" );
}
void test_main(void)
{
puts( "Sleeping to see what happens" );
sleep( 5 );
printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" );
exit( 0 );
}