Introspection: Use plugin test Makefile template

Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
diff --git a/design_introspection-plugin/tests/Makefile b/design_introspection-plugin/tests/Makefile
index 7f51d0f..fcca1e9 100644
--- a/design_introspection-plugin/tests/Makefile
+++ b/design_introspection-plugin/tests/Makefile
@@ -1,35 +1,11 @@
-TESTS = get_nets get_ports get_cells get_pins
-.PHONY: $(TESTS)
+TESTS = get_nets \
+	get_ports \
+	get_cells \
+	get_pins
 
-get_nets_verify = $(call compare,get_nets,txt)
-get_ports_verify = $(call compare,get_ports,txt)
-get_cells_verify = $(call compare,get_cells,txt)
-get_pins_verify = $(call compare,get_pins,txt)
+include $(shell pwd)/../../Makefile_test.common
 
-all: $(TESTS)
-compare = diff $(1)/$(1).golden.$(2) $(1)/$(1).$(2)
-
-define test_tpl =
-$(1): $(1)/$(1).sdc
-	$$($(1)_verify)
-	RETVAL=$$$$? ; \
-	if [ $$$$RETVAL -eq 0 ]; then \
-		echo "$(1) PASS"; \
-		true; \
-	else \
-		echo "$(1) FAIL"; \
-		false; \
-	fi
-
-$(1)/$(1).sdc: $(1)/$(1).v
-	cd $(1); \
-	INPUT_SDC_FILE=$(1).input.sdc \
-	OUTPUT_SDC_FILE=$(1).sdc \
-	yosys -p "tcl $(1).tcl" -l yosys.log
-
-endef
-
-$(foreach test,$(TESTS),$(eval $(call test_tpl,$(test))))
-
-clean:
-	rm -rf $(foreach test,$(TESTS),$(test)/$(test).sdc $(test)/$(test).txt $(test)/yosys.log)
+get_nets_verify = $(call diff_test,get_nets,txt)
+get_ports_verify = $(call diff_test,get_ports,txt)
+get_cells_verify = $(call diff_test,get_cells,txt)
+get_pins_verify = $(call diff_test,get_pins,txt)