All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libfdt: Use libfdt shared library for testcases
@ 2009-01-02 13:21 Josh Boyer
       [not found] ` <20090102132113.GC8954-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2009-01-02 13:21 UTC (permalink / raw)
  To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A

Link the testcases against the libfdt.so that is built and use
it for the testsuite verification.

Signed-off-by: Josh Boyer <jwboyer-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 tests/Makefile.tests |    9 +++++++--
 tests/tests.sh       |    1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 3a041ff..0b0ff70 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -35,9 +35,11 @@ TESTS_CLEANFILES = $(TESTS) $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
 .PHONY: tests
 tests:	$(TESTS) $(TESTS_TREES)
 
-$(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_archive)
+$(LIB_TESTS): LDFLAGS = -L$(LIBFDT_objdir) -lfdt
+$(LIB_TESTS): $(TESTS_PREFIX)testutils.o $(LIBFDT_lib)
 
-$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_archive)
+$(LIBTREE_TESTS): LDFLAGS = -L$(LIBFDT_objdir) -lfdt
+$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_lib)
 
 $(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o
 
@@ -45,6 +47,9 @@ $(TESTS_TREES): $(TESTS_PREFIX)dumptrees
 	@$(VECHO) DUMPTREES
 	cd $(TESTS_PREFIX); ./dumptrees >/dev/null
 
+$(TESTS_PREFIX)testutils.o: $(TESTS_PREFIX)testutils.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -L$(LIBFDT_objdir) -lfdt -o $@ -c $<
+
 tests_clean:
 	@$(VECHO) CLEAN "(tests)"
 	rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
diff --git a/tests/tests.sh b/tests/tests.sh
index 30ffead..6eb972b 100644
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -11,6 +11,7 @@ FAIL () {
 }
 
 DTC=../dtc
+LD_LIBRARY_PATH=../libfdt
 
 verbose_run () {
     if [ -z "$QUIET_TEST" ]; then
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-02 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-02 13:21 [PATCH] libfdt: Use libfdt shared library for testcases Josh Boyer
     [not found] ` <20090102132113.GC8954-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
2009-01-02 15:41   ` Jon Loeliger
     [not found]     ` <E1LIm90-00048J-HK-CYoMK+44s/E@public.gmane.org>
2009-01-02 17:07       ` Josh Boyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.