diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2010-11-10 09:51:09 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2010-11-13 15:47:29 -0600 |
commit | 37c0b6a0916c31a5eae0a9ddfcc5d0b8fb4569c6 (patch) | |
tree | 26035a19464d9a564939f0ad9ac360f5ae005506 /tests | |
parent | 73ae43ea44a40c2ac00dd94523f270177a1e72e9 (diff) | |
download | device-tree-compiler-37c0b6a0916c31a5eae0a9ddfcc5d0b8fb4569c6.tar.gz |
dtc: Add code to make diffing trees easier
This patch adds a "dtdiff" script to do a useful form diff of two
device trees. This automatically converts the tree to dts form (if
it's not already) and uses a new "-s" option in dtc to "sort" the
tree. That is, it sorts the reserve entries, it sorts the properties
within each node by name, and it sorts nodes by name within their
parent.
This gives a pretty sensible diff between the trees, which will ignore
semantically null internal rearrangements (directly diffing the dts
files can give a lot of noise due to the order changes).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run_tests.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh index a887254..72dda32 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -370,6 +370,13 @@ cmp_tests () { for tree in $wrongtrees; do run_test dtbs_equal_unordered -n $basetree $tree done + + # now dtc --sort + run_dtc_test -I dtb -O dtb -s -o $basetree.sorted.test.dtb $basetree + run_test dtbs_equal_unordered $basetree $basetree.sorted.test.dtb + run_dtc_test -I dtb -O dtb -s -o $basetree.reversed.sorted.test.dtb $basetree.reversed.test.dtb + run_test dtbs_equal_unordered $basetree.reversed.test.dtb $basetree.reversed.sorted.test.dtb + run_test dtbs_equal_ordered $basetree.sorted.test.dtb $basetree.reversed.sorted.test.dtb } dtbs_equal_tests () { |