Browse Source

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>
main
David Gibson 17 years ago committed by Jon Loeliger
parent
commit
f8e52fe6d8
  1. 1
      tests/include0.dts
  2. 23
      tests/include1.dts
  3. 1
      tests/include2.dts
  4. 1
      tests/include3.dts
  5. 1
      tests/include4.dts
  6. 1
      tests/include5.dts
  7. 1
      tests/include6.dts
  8. 9
      tests/include7.dts
  9. 1
      tests/include8.dts
  10. 4
      tests/run_tests.sh

1
tests/include0.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
/include/ "include1.dts"

23
tests/include1.dts

@ -0,0 +1,23 @@ @@ -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>;
};
};
};

1
tests/include2.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
/memreserve/ 0xdeadbeef00000000 0x100000;

1
tests/include3.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
123456789 010000

1
tests/include4.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
compatible = "test_tree1";

1
tests/include5.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
prop-int

1
tests/include6.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
"hello world"

9
tests/include7.dts

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
subnode@1 {
compatible = "subnode1";
prop-int = [deadbeef];

subsubnode {
compatible = "subsubnode1", "subsubnode";
prop-int = <0xdeadbeef>;
};
};

1
tests/include8.dts

@ -0,0 +1 @@ @@ -0,0 +1 @@
subsubnode@0 {

4
tests/run_tests.sh

@ -206,6 +206,10 @@ dtc_tests () { @@ -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

Loading…
Cancel
Save