mirror of https://gitlab.com/qemu-project/dtc.git
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@gibson.dropbear.id.au>
This commit is contained in:
parent
f8bf4bfc87
commit
f8e52fe6d8
|
@ -0,0 +1 @@
|
||||||
|
/include/ "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@2 {
|
||||||
|
linux,phandle = <0x2000>;
|
||||||
|
prop-int = <123456789>;
|
||||||
|
|
||||||
|
/include/ "include8.dts"
|
||||||
|
linux,phandle = <0x2001>;
|
||||||
|
compatible = "subsubnode2", "subsubnode";
|
||||||
|
prop-int = <0726746425>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
/memreserve/ 0xdeadbeef00000000 0x100000;
|
|
@ -0,0 +1 @@
|
||||||
|
123456789 010000
|
|
@ -0,0 +1 @@
|
||||||
|
compatible = "test_tree1";
|
|
@ -0,0 +1 @@
|
||||||
|
prop-int
|
|
@ -0,0 +1 @@
|
||||||
|
"hello world"
|
|
@ -0,0 +1,9 @@
|
||||||
|
subnode@1 {
|
||||||
|
compatible = "subnode1";
|
||||||
|
prop-int = [deadbeef];
|
||||||
|
|
||||||
|
subsubnode {
|
||||||
|
compatible = "subsubnode1", "subsubnode";
|
||||||
|
prop-int = <0xdeadbeef>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
subsubnode@0 {
|
|
@ -206,6 +206,10 @@ dtc_tests () {
|
||||||
run_dtc_test -I dts -O dtb -o dtc_comments-cmp.test.dtb comments-cmp.dts
|
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
|
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
|
# Check /incbin/ directive
|
||||||
run_dtc_test -I dts -O dtb -o incbin.test.dtb incbin.dts
|
run_dtc_test -I dts -O dtb -o incbin.test.dtb incbin.dts
|
||||||
run_test incbin incbin.test.dtb
|
run_test incbin incbin.test.dtb
|
||||||
|
|
Loading…
Reference in New Issue