[Crosstoolchain-logs] [device-tree-compiler] 04/58: tests: Add overlay tests
Vagrant Cascadian
vagrant at moszumanska.debian.org
Mon Sep 25 16:23:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
vagrant pushed a commit to branch debian/master
in repository device-tree-compiler.
commit e7b3c3b5951b606cfbbb3d680cc7566b6d3badbb
Author: Pantelis Antoniou <pantelis.antoniou at konsulko.com>
Date: Wed Dec 7 14:48:20 2016 +0200
tests: Add overlay tests
Add a number of tests for dynamic objects/overlays.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou at konsulko.com>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
tests/overlay_base_fixups.dts | 22 ++++++++++++++++++++++
tests/overlay_overlay_dtc.dts | 1 +
tests/overlay_overlay_simple.dts | 12 ++++++++++++
tests/run_tests.sh | 29 +++++++++++++++++++++++++++++
4 files changed, 64 insertions(+)
diff --git a/tests/overlay_base_fixups.dts b/tests/overlay_base_fixups.dts
new file mode 100644
index 0000000..815a054
--- /dev/null
+++ b/tests/overlay_base_fixups.dts
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2016 Konsulko Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/dts-v1/;
+
+/ {
+ test: test-node {
+ test-int-property = <42>;
+ test-str-property = "foo";
+
+ subtest: sub-test-node {
+ sub-test-property;
+ };
+ };
+
+ ref {
+ local-ref = <&test &subtest>;
+ };
+};
diff --git a/tests/overlay_overlay_dtc.dts b/tests/overlay_overlay_dtc.dts
index 30d2362..b6d841b 100644
--- a/tests/overlay_overlay_dtc.dts
+++ b/tests/overlay_overlay_dtc.dts
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2016 NextThing Co
* Copyright (c) 2016 Free Electrons
+ * Copyright (c) 2016 Konsulko Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
diff --git a/tests/overlay_overlay_simple.dts b/tests/overlay_overlay_simple.dts
new file mode 100644
index 0000000..8657e1e
--- /dev/null
+++ b/tests/overlay_overlay_simple.dts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2016 Konsulko Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/dts-v1/;
+/plugin/;
+
+&test {
+ test-int-property = <43>;
+};
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index d64cb2a..b8e7d44 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -181,6 +181,35 @@ overlay_tests () {
run_dtc_test -@ -I dts -O dtb -o overlay_base_with_symbols.test.dtb overlay_base.dts
run_dtc_test -@ -I dts -O dtb -o overlay_overlay_with_symbols.test.dtb overlay_overlay_dtc.dts
run_test overlay overlay_base_with_symbols.test.dtb overlay_overlay_with_symbols.test.dtb
+
+ # Test symbols/fixups existence
+ run_test check_path overlay_overlay_with_symbols.test.dtb exists "/__symbols__"
+ run_test check_path overlay_overlay_with_symbols.test.dtb exists "/__fixups__"
+ run_test check_path overlay_overlay_with_symbols.test.dtb exists "/__local_fixups__"
+
+ # test plugin source to dtb and back
+ run_dtc_test -@ -I dtb -O dts -o overlay_overlay_dtc.test.dts overlay_overlay_with_symbols.test.dtb
+ run_dtc_test -@ -I dts -O dtb -o overlay_overlay_with_symbols.test.test.dtb overlay_overlay_dtc.test.dts
+ run_test dtbs_equal_ordered overlay_overlay_with_symbols.test.dtb overlay_overlay_with_symbols.test.test.dtb
+
+ # test plugin auto-generation without using -@
+ run_dtc_test -I dts -O dtb -o overlay_overlay_with_symbols_auto.test.dtb overlay_overlay_dtc.dts
+ run_test check_path overlay_overlay_with_symbols_auto.test.dtb exists "/__symbols__"
+ run_test check_path overlay_overlay_with_symbols_auto.test.dtb exists "/__fixups__"
+ run_test check_path overlay_overlay_with_symbols_auto.test.dtb exists "/__local_fixups__"
+
+ # Test suppression of fixups
+ run_dtc_test -@ -I dts -O dtb -o overlay_base_with_symbols_no_fixups.test.dtb overlay_base_fixups.dts
+ run_test check_path overlay_base_with_symbols_no_fixups.test.dtb exists "/__symbols__"
+ run_test check_path overlay_base_with_symbols_no_fixups.test.dtb not-exists "/__fixups__"
+ run_test check_path overlay_base_with_symbols_no_fixups.test.dtb not-exists "/__local_fixups__"
+
+ # Test generation of aliases insted of symbols
+ run_dtc_test -A -I dts -O dtb -o overlay_overlay_with_aliases.dtb overlay_overlay_dtc.dts
+ run_test check_path overlay_overlay_with_aliases.dtb exists "/aliases"
+ run_test check_path overlay_overlay_with_aliases.dtb exists "/__symbols__"
+ run_test check_path overlay_overlay_with_aliases.dtb exists "/__fixups__"
+ run_test check_path overlay_overlay_with_aliases.dtb exists "/__local_fixups__"
fi
# Bad fixup tests
--
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