[rtems-libbsd commit] link01 - Clean up and split so initialization can be reused in other tests

Joel Sherrill joel at rtems.org
Fri Aug 3 13:36:46 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    e717e817932a74bd7cf3bb92fc90d386f5bd1801
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=e717e817932a74bd7cf3bb92fc90d386f5bd1801

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Thu Jul 26 07:18:19 2012 -0500

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.

---

 testsuite/link01/Makefile_ldr       |   31 -------------------------------
 testsuite/link01/{test.c => init.c} |    0
 testsuite/link01/test_main.c        |   23 +++++++++++++++++++++++
 3 files changed, 23 insertions(+), 31 deletions(-)

diff --git a/testsuite/link01/Makefile_ldr b/testsuite/link01/Makefile_ldr
deleted file mode 100644
index 54db09a..0000000
--- a/testsuite/link01/Makefile_ldr
+++ /dev/null
@@ -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
diff --git a/testsuite/link01/test.c b/testsuite/link01/init.c
similarity index 100%
rename from testsuite/link01/test.c
rename to testsuite/link01/init.c
diff --git a/testsuite/link01/test_main.c b/testsuite/link01/test_main.c
new file mode 100644
index 0000000..3e7c43e
--- /dev/null
+++ b/testsuite/link01/test_main.c
@@ -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 );
+}




More information about the vc mailing list