Skip to contentSkip to conversation

libfdt: Use Jon's fdc for testing

PATCH In review Jerry Van Baren 1 participant 1 message Feb 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 libfdt: Use Jon's fdc for testing

Use jdl's flattened device tree compiler (dtc) to generate the test tree.

---
 tests/Makefile       |   11 ++++++++---
 tests/test_tree1.dts |   23 +++++++++++++++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)
tests/Makefile +8 -3
index 533c98e..7f7ed9b 100644
@@ -41,15 +41,20 @@ all:	$(TESTS) $(TREES)
 	@$(VECHO) LD $@
 	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 
+%.dtb: %.dts
+	@$(VECHO) NOTE: It is normal to have errors and warnings here.
+	dtc -b 0 -f -O dtb -V 16 $^ > $@
+
+
 $(LIB_TESTS): %: testutils.o $(LIBFDT)
 
 $(LIBTREE_TESTS): %: testutils.o trees.o $(LIBFDT)
 
 dumptrees: %: trees.o
 
-$(TREES): dumptrees
-	@$(VECHO) DUMPTREES
-	./dumptrees >/dev/null
+#$(TREES): dumptrees
+#	@$(VECHO) DUMPTREES
+#	./dumptrees >/dev/null
 
 clean:
 	@$(VECHO) CLEAN "(tests)"
tests/test_tree1.dts new file +23 -0
new file mode 100644
index 0000000..ab62772
@@ -0,0 +1,23 @@
+/*
+ * libfdt test tree source
+ */
+
+/ {
+	/*
+	 * Test nodes and values...
+	 */
+	prop_int = <deadbeef>;
+	prop_str = "hello world";
+	subnode1 {
+		prop_int = <deadbeef>;
+		subsubnode {
+			prop_int = <deadbeef>;
+		};
+	};
+	subnode2 {
+		prop_int = <abcd1234>;
+		subsubnode {
+			prop_int = <abcd1234>;
+		};
+	};
+};
Signature · 7 lines
1.4.4.4


______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its authenticity cannot be guaranteed.

______________________________________________________