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