Devicetree
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: [PATCH] libfdt: Use libfdt shared library for testcases
Date: Fri, 2 Jan 2009 08:21:13 -0500	[thread overview]
Message-ID: <20090102132113.GC8954@zod.rchland.ibm.com> (raw)

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

             reply	other threads:[~2009-01-02 13:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-02 13:21 Josh Boyer [this message]
     [not found] ` <20090102132113.GC8954-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
2009-01-02 15:41   ` [PATCH] libfdt: Use libfdt shared library for testcases Jon Loeliger
     [not found]     ` <E1LIm90-00048J-HK-CYoMK+44s/E@public.gmane.org>
2009-01-02 17:07       ` Josh Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090102132113.GC8954@zod.rchland.ibm.com \
    --to=jwboyer-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox