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