[Crosstoolchain-logs] [device-tree-compiler] 280/357: dtc: Testcase for /include/ directive

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit f8e52fe6d87cadbaf0b440073fb9137bef36ee98
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Tue Jun 24 11:21:44 2008 +1000

    dtc: Testcase for /include/ directive
    
    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 at gibson.dropbear.id.au>
---
 tests/include0.dts |  1 +
 tests/include1.dts | 23 +++++++++++++++++++++++
 tests/include2.dts |  1 +
 tests/include3.dts |  1 +
 tests/include4.dts |  1 +
 tests/include5.dts |  1 +
 tests/include6.dts |  1 +
 tests/include7.dts |  9 +++++++++
 tests/include8.dts |  1 +
 tests/run_tests.sh |  4 ++++
 10 files changed, 43 insertions(+)

diff --git a/tests/include0.dts b/tests/include0.dts
new file mode 100644
index 0000000..355ed6a
--- /dev/null
+++ b/tests/include0.dts
@@ -0,0 +1 @@
+/include/ "include1.dts"
diff --git a/tests/include1.dts b/tests/include1.dts
new file mode 100644
index 0000000..0c7f42e
--- /dev/null
+++ b/tests/include1.dts
@@ -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 at 2 {
+		linux,phandle = <0x2000>;
+		prop-int = <123456789>;
+
+		/include/ "include8.dts"
+			linux,phandle = <0x2001>;
+			compatible = "subsubnode2", "subsubnode";
+			prop-int = <0726746425>;
+		};
+	};
+};
diff --git a/tests/include2.dts b/tests/include2.dts
new file mode 100644
index 0000000..7e189dd
--- /dev/null
+++ b/tests/include2.dts
@@ -0,0 +1 @@
+/memreserve/ 0xdeadbeef00000000 0x100000;
diff --git a/tests/include3.dts b/tests/include3.dts
new file mode 100644
index 0000000..ee9d277
--- /dev/null
+++ b/tests/include3.dts
@@ -0,0 +1 @@
+123456789 010000
diff --git a/tests/include4.dts b/tests/include4.dts
new file mode 100644
index 0000000..b2ddbe5
--- /dev/null
+++ b/tests/include4.dts
@@ -0,0 +1 @@
+	compatible = "test_tree1";
diff --git a/tests/include5.dts b/tests/include5.dts
new file mode 100644
index 0000000..9a35dc5
--- /dev/null
+++ b/tests/include5.dts
@@ -0,0 +1 @@
+prop-int
diff --git a/tests/include6.dts b/tests/include6.dts
new file mode 100644
index 0000000..cd4bc1a
--- /dev/null
+++ b/tests/include6.dts
@@ -0,0 +1 @@
+"hello world"
diff --git a/tests/include7.dts b/tests/include7.dts
new file mode 100644
index 0000000..fa726f9
--- /dev/null
+++ b/tests/include7.dts
@@ -0,0 +1,9 @@
+	subnode at 1 {
+		compatible = "subnode1";
+		prop-int = [deadbeef];
+
+		subsubnode {
+			compatible = "subsubnode1", "subsubnode";
+			prop-int = <0xdeadbeef>;
+		};
+	};
diff --git a/tests/include8.dts b/tests/include8.dts
new file mode 100644
index 0000000..ec70064
--- /dev/null
+++ b/tests/include8.dts
@@ -0,0 +1 @@
+subsubnode at 0 {
\ No newline at end of file
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 3b78f8d..ed0c450 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -206,6 +206,10 @@ dtc_tests () {
     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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list