blob: 0087582faabaf84c67509ecf7116438ad2a8f3ec [file] [log] [blame]
David Gibsond9d679f2007-06-26 12:45:51 +10001LIB_TESTS_L = root_node find_property subnode_offset path_offset getprop \
2 notfound \
3 setprop_inplace nop_property nop_node \
4 sw_tree1 \
5 move_and_save \
6 open_pack rw_tree1 setprop del_property del_node
7LIB_TESTS = $(LIB_TESTS_L:%=$(TESTS_PREFIX)%)
8
9LIBTREE_TESTS_L = truncated_property
10LIBTREE_TESTS = $(LIBTREE_TESTS_L:%=$(TESTS_PREFIX)%)
11
12TESTS = $(LIB_TESTS) $(LIBTREE_TESTS)
13
14TESTS_TREES_L = test_tree1.dtb
15TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_PREFIX)%)
16
17TESTS_TARGETS = $(TESTS) $(TESTS_TREES)
18
19TESTS_DEPFILES = $(TESTS:%=%.d) $(TESTS_PREFIX)testutils.d
20
21TESTS_CLEANFILES_L = *.output vgcore.* *.dtb
22TESTS_CLEANFILES = $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
23
24BIN += $(TESTS) $(TESTS_PREFIX)dumptrees
25
26.PHONY: tests
27tests: $(TESTS) $(TESTS_TREES)
28
29$(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_LIB)
30
31$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_LIB)
32
33$(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o
34
35$(TESTS_TREES): $(TESTS_PREFIX)dumptrees
36 @$(VECHO) DUMPTREES
37 cd $(TESTS_PREFIX); ./dumptrees >/dev/null
38
39tests_clean:
40 @$(VECHO) CLEAN "(tests)"
41 rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
42 rm -f $(TESTS_CLEANFILES)
43
44check: tests
45 cd $(TESTS_PREFIX); ./run_tests.sh
46
47checkv: tests
48 cd $(TESTS_PREFIX); ./run_tests.sh -v
49
50func: tests
51 cd $(TESTS_PREFIX); ./run_tests.sh -t func
52
53funcv: tests
54 cd $(TESTS_PREFIX); ./run_tests.sh -t func -v
55
56stress: tests
57 cd $(TESTS_PREFIX); ./run_tests.sh -t stress
58
59stressv: tests
60 cd $(TESTS_PREFIX); ./run_tests.sh -t stress -v
61
62ifneq ($(DEPTARGETS),)
63-include $(TESTS_DEPFILES)
64endif
65