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@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@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@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