aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/hw/test/Makefile.check
diff options
context:
space:
mode:
Diffstat (limited to 'roms/skiboot/hw/test/Makefile.check')
-rw-r--r--roms/skiboot/hw/test/Makefile.check29
1 files changed, 29 insertions, 0 deletions
diff --git a/roms/skiboot/hw/test/Makefile.check b/roms/skiboot/hw/test/Makefile.check
new file mode 100644
index 000000000..45eb8072f
--- /dev/null
+++ b/roms/skiboot/hw/test/Makefile.check
@@ -0,0 +1,29 @@
+# -*-Makefile-*-
+SUBDIRS += hw/test/
+HW_TEST := hw/test/phys-map-test hw/test/run-port80h
+
+.PHONY : hw-check
+hw-check: $(HW_TEST:%=%-check)
+
+.PHONY : hw-coverage
+hw-coverage: $(HW_TEST:%=%-gcov-run)
+
+check: hw-check
+coverage: hw-coverage
+
+$(HW_TEST:%=%-gcov-run) : %-run: %
+ $(call QTEST, TEST-COVERAGE ,$< , $<)
+
+$(HW_TEST:%=%-check) : %-check: %
+ $(call QTEST, RUN-TEST ,$(VALGRIND) $<, $<)
+
+$(HW_TEST) : % : %.c hw/phys-map.o
+ $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -o $@ $<, $<)
+
+$(HW_TEST:%=%-gcov): %-gcov : %.c %
+ $(call QTEST, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTGCOVCFLAGS) -I include -I . -lgcov -o $@ $<, $<)
+
+clean: hw-clean
+
+hw-clean:
+ $(RM) -f hw/test/*.[od] $(HW_TEST) $(HW_TEST:%=%-gcov)