David Gibson | fd1bf3a | 2007-10-10 17:12:12 +1000 | [diff] [blame^] | 1 | LIB_TESTS_L = get_mem_rsv \ |
| 2 | root_node find_property subnode_offset path_offset \ |
David Gibson | 1248237 | 2007-08-30 14:54:04 +1000 | [diff] [blame] | 3 | get_name getprop get_path supernode_atdepth_offset parent_offset \ |
David Gibson | ae1454b | 2007-09-17 14:28:34 +1000 | [diff] [blame] | 4 | node_offset_by_prop_value \ |
David Gibson | d9d679f | 2007-06-26 12:45:51 +1000 | [diff] [blame] | 5 | notfound \ |
| 6 | setprop_inplace nop_property nop_node \ |
| 7 | sw_tree1 \ |
| 8 | move_and_save \ |
| 9 | open_pack rw_tree1 setprop del_property del_node |
| 10 | LIB_TESTS = $(LIB_TESTS_L:%=$(TESTS_PREFIX)%) |
| 11 | |
| 12 | LIBTREE_TESTS_L = truncated_property |
| 13 | LIBTREE_TESTS = $(LIBTREE_TESTS_L:%=$(TESTS_PREFIX)%) |
| 14 | |
| 15 | TESTS = $(LIB_TESTS) $(LIBTREE_TESTS) |
| 16 | |
| 17 | TESTS_TREES_L = test_tree1.dtb |
| 18 | TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_PREFIX)%) |
| 19 | |
| 20 | TESTS_TARGETS = $(TESTS) $(TESTS_TREES) |
| 21 | |
| 22 | TESTS_DEPFILES = $(TESTS:%=%.d) $(TESTS_PREFIX)testutils.d |
| 23 | |
| 24 | TESTS_CLEANFILES_L = *.output vgcore.* *.dtb |
| 25 | TESTS_CLEANFILES = $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%) |
| 26 | |
| 27 | BIN += $(TESTS) $(TESTS_PREFIX)dumptrees |
| 28 | |
| 29 | .PHONY: tests |
| 30 | tests: $(TESTS) $(TESTS_TREES) |
| 31 | |
| 32 | $(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_LIB) |
| 33 | |
| 34 | $(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_LIB) |
| 35 | |
| 36 | $(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o |
| 37 | |
| 38 | $(TESTS_TREES): $(TESTS_PREFIX)dumptrees |
| 39 | @$(VECHO) DUMPTREES |
| 40 | cd $(TESTS_PREFIX); ./dumptrees >/dev/null |
| 41 | |
| 42 | tests_clean: |
| 43 | @$(VECHO) CLEAN "(tests)" |
| 44 | rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%) |
| 45 | rm -f $(TESTS_CLEANFILES) |
| 46 | |
David Gibson | 8d59bd3 | 2007-09-18 10:33:40 +1000 | [diff] [blame] | 47 | check: tests dtc |
David Gibson | d9d679f | 2007-06-26 12:45:51 +1000 | [diff] [blame] | 48 | cd $(TESTS_PREFIX); ./run_tests.sh |
| 49 | |
David Gibson | 8d59bd3 | 2007-09-18 10:33:40 +1000 | [diff] [blame] | 50 | checkv: tests dtc |
David Gibson | d9d679f | 2007-06-26 12:45:51 +1000 | [diff] [blame] | 51 | cd $(TESTS_PREFIX); ./run_tests.sh -v |
| 52 | |
David Gibson | d9d679f | 2007-06-26 12:45:51 +1000 | [diff] [blame] | 53 | ifneq ($(DEPTARGETS),) |
| 54 | -include $(TESTS_DEPFILES) |
| 55 | endif |
| 56 | |