From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: dtc: Testcase for /include/ directive
Date: Tue, 24 Jun 2008 11:21:44 +1000 [thread overview]
Message-ID: <20080624012144.GB1236@yookeroo.seuss> (raw)
This patch adds a testcase for the /include/ directive. It assembles
a sample dts file with many /include/ directives at a variety of
different lexical / grammatical contexts.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/include0.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include0.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+/include/ "include1.dts"
Index: dtc/tests/include1.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include1.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1,23 @@
+/dts-v1/;
+
+/include/ "include2.dts"
+/memreserve/ /include/ "include3.dts";
+
+/ {
+ /include/ "include4.dts"
+ /include/ "include5.dts" = <0xdeadbeef>;
+ prop-str = /include/ "include6.dts";
+
+ /include/ "include7.dts"
+
+ subnode@2 {
+ linux,phandle = <0x2000>;
+ prop-int = <123456789>;
+
+ /include/ "include8.dts"
+ linux,phandle = <0x2001>;
+ compatible = "subsubnode2", "subsubnode";
+ prop-int = <0726746425>;
+ };
+ };
+};
Index: dtc/tests/include2.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include2.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+/memreserve/ 0xdeadbeef00000000 0x100000;
Index: dtc/tests/include3.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include3.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+123456789 010000
Index: dtc/tests/include4.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include4.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+ compatible = "test_tree1";
Index: dtc/tests/include5.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include5.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+prop-int
Index: dtc/tests/include6.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include6.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+"hello world"
Index: dtc/tests/include7.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include7.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1,9 @@
+ subnode@1 {
+ compatible = "subnode1";
+ prop-int = [deadbeef];
+
+ subsubnode {
+ compatible = "subsubnode1", "subsubnode";
+ prop-int = <0xdeadbeef>;
+ };
+ };
Index: dtc/tests/include8.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/include8.dts 2008-06-24 11:19:42.000000000 +1000
@@ -0,0 +1 @@
+subsubnode@0 {
\ No newline at end of file
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2008-06-24 11:19:07.000000000 +1000
+++ dtc/tests/run_tests.sh 2008-06-24 11:19:42.000000000 +1000
@@ -207,6 +207,10 @@
run_dtc_test -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts
run_test dtbs_equal_ordered dtc_comments.test.dtb dtc_comments-cmp.test.dtb
+ # Check /include/ directive
+ run_dtc_test -I dts -O dtb -o includes.test.dtb include0.dts
+ run_test dtbs_equal_ordered includes.test.dtb test_tree1.dtb
+
# Check /incbin/ directive
run_dtc_test -I dts -O dtb -o incbin.test.dtb incbin.dts
run_test incbin incbin.test.dtb
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next reply other threads:[~2008-06-24 1:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 1:21 David Gibson [this message]
2008-07-14 18:49 ` dtc: Testcase for /include/ directive Jon Loeliger
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=20080624012144.GB1236@yookeroo.seuss \
--to=david@gibson.dropbear.id.au \
--cc=jdl@freescale.com \
--cc=linuxppc-dev@ozlabs.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