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