1 LIB_TESTS_L = get_mem_rsv \
2 root_node find_property subnode_offset path_offset \
3 get_name getprop get_phandle \
4 get_path supernode_atdepth_offset parent_offset \
5 node_offset_by_prop_value node_offset_by_phandle \
6 node_check_compatible node_offset_by_compatible \
11 setprop_inplace nop_property nop_node \
13 move_and_save mangle-layout nopulate \
14 open_pack rw_tree1 set_name setprop del_property del_node \
15 appendprop1 appendprop2 propname_escapes \
16 string_escapes references path-references phandle_format \
18 extra-terminating-null \
20 dtb_reverse dtbs_equal_unordered \
21 add_subnode_with_nops path_offset_aliases \
25 LIB_TESTS = $(LIB_TESTS_L:%=$(TESTS_PREFIX)%)
27 LIBTREE_TESTS_L = truncated_property
28 LIBTREE_TESTS = $(LIBTREE_TESTS_L:%=$(TESTS_PREFIX)%)
30 DL_LIB_TESTS_L = asm_tree_dump value-labels
31 DL_LIB_TESTS = $(DL_LIB_TESTS_L:%=$(TESTS_PREFIX)%)
33 TESTS = $(LIB_TESTS) $(LIBTREE_TESTS) $(DL_LIB_TESTS)
35 TESTS_TREES_L = test_tree1.dtb
36 TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_PREFIX)%)
38 TESTS_TARGETS = $(TESTS) $(TESTS_TREES)
40 TESTS_DEPFILES = $(TESTS:%=%.d) \
41 $(addprefix $(TESTS_PREFIX),testutils.d trees.d dumptrees.d)
43 TESTS_CLEANFILES_L = *.output vglog.* vgcore.* *.dtb *.test.dts *.dtsv1 tmp.*
44 TESTS_CLEANFILES_L += dumptrees
45 TESTS_CLEANFILES = $(TESTS) $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
48 tests: $(TESTS) $(TESTS_TREES)
50 $(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive)
52 $(DL_LIB_TESTS): %: %.o $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive)
53 @$(VECHO) LD [libdl] $@
54 $(LINK.c) -o $@ $^ -ldl
56 $(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o \
57 util.o $(LIBFDT_archive)
59 $(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o
61 $(TESTS_TREES): $(TESTS_PREFIX)dumptrees
63 cd $(TESTS_PREFIX); ./dumptrees >/dev/null
66 @$(VECHO) CLEAN "(tests)"
67 rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
68 rm -f $(TESTS_CLEANFILES)
70 check: tests ${TESTS_BIN}
71 cd $(TESTS_PREFIX); ./run_tests.sh
73 checkm: tests ${TESTS_BIN}
74 cd $(TESTS_PREFIX); ./run_tests.sh -m 2>&1 | tee vglog.$$$$
76 checkv: tests ${TESTS_BIN}
77 cd $(TESTS_PREFIX); ./run_tests.sh -v
79 ifneq ($(DEPTARGETS),)
80 -include $(TESTS_DEPFILES)