Add qemu 2.4.0
[kvmfornfv.git] / qemu / dtc / tests / Makefile.tests
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 \
7         get_alias \
8         char_literal \
9         sized_cells \
10         notfound \
11         setprop_inplace nop_property nop_node \
12         sw_tree1 \
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 \
17         boot-cpuid incbin \
18         extra-terminating-null \
19         dtbs_equal_ordered \
20         dtb_reverse dtbs_equal_unordered \
21         add_subnode_with_nops path_offset_aliases \
22         utilfdt_test \
23         integer-expressions \
24         subnode_iterate
25 LIB_TESTS = $(LIB_TESTS_L:%=$(TESTS_PREFIX)%)
26
27 LIBTREE_TESTS_L = truncated_property
28 LIBTREE_TESTS = $(LIBTREE_TESTS_L:%=$(TESTS_PREFIX)%)
29
30 DL_LIB_TESTS_L = asm_tree_dump value-labels
31 DL_LIB_TESTS = $(DL_LIB_TESTS_L:%=$(TESTS_PREFIX)%)
32
33 TESTS = $(LIB_TESTS) $(LIBTREE_TESTS) $(DL_LIB_TESTS)
34
35 TESTS_TREES_L = test_tree1.dtb
36 TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_PREFIX)%)
37
38 TESTS_TARGETS = $(TESTS) $(TESTS_TREES)
39
40 TESTS_DEPFILES = $(TESTS:%=%.d) \
41         $(addprefix $(TESTS_PREFIX),testutils.d trees.d dumptrees.d)
42
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)%)
46
47 .PHONY: tests
48 tests:  $(TESTS) $(TESTS_TREES)
49
50 $(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive)
51
52 $(DL_LIB_TESTS): %: %.o $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive)
53         @$(VECHO) LD [libdl] $@
54         $(LINK.c) -o $@ $^ -ldl
55
56 $(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o \
57                 util.o $(LIBFDT_archive)
58
59 $(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o
60
61 $(TESTS_TREES): $(TESTS_PREFIX)dumptrees
62         @$(VECHO) DUMPTREES
63         cd $(TESTS_PREFIX); ./dumptrees >/dev/null
64
65 tests_clean:
66         @$(VECHO) CLEAN "(tests)"
67         rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
68         rm -f $(TESTS_CLEANFILES)
69
70 check:  tests ${TESTS_BIN}
71         cd $(TESTS_PREFIX); ./run_tests.sh
72
73 checkm: tests ${TESTS_BIN}
74         cd $(TESTS_PREFIX); ./run_tests.sh -m 2>&1 | tee vglog.$$$$
75
76 checkv: tests ${TESTS_BIN}
77         cd $(TESTS_PREFIX); ./run_tests.sh -v
78
79 ifneq ($(DEPTARGETS),)
80 -include $(TESTS_DEPFILES)
81 endif
82