]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/tcg: build plugin list from contents of src directory
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 15 Jun 2020 14:19:21 +0000 (15:19 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 16 Jun 2020 13:49:05 +0000 (14:49 +0100)
If you jump back and forth between branches while developing plugins
you end up debugging failures caused by plugins left in the build
directory. Fix this by basing plugins on the source tree instead.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200615141922.18829-2-alex.bennee@linaro.org>

tests/tcg/Makefile.target
tests/tcg/aarch64/Makefile.target
tests/tcg/arm/Makefile.target

index b3cff3cad1a081f131ba3722cbc3f87510340623..2ae86776cdc16f99719924fc9f0c8c8ab031afe8 100644 (file)
@@ -126,9 +126,10 @@ RUN_TESTS=$(patsubst %,run-%, $(TESTS))
 
 # If plugins exist also include those in the tests
 ifeq ($(CONFIG_PLUGIN),y)
-PLUGIN_DIR=../../plugin
-VPATH+=$(PLUGIN_DIR)
-PLUGINS=$(notdir $(wildcard $(PLUGIN_DIR)/*.so))
+PLUGIN_SRC=$(SRC_PATH)/tests/plugin
+PLUGIN_LIB=../../plugin
+VPATH+=$(PLUGIN_LIB)
+PLUGINS=$(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c)))
 
 # We need to ensure expand the run-plugin-TEST-with-PLUGIN
 # pre-requistes manually here as we can't use stems to handle it. We
@@ -152,7 +153,7 @@ run-%: %
 
 run-plugin-%:
        $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
-               -plugin $(PLUGIN_DIR)/$(call extract-plugin,$@) \
+               -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
                -d plugin -D $*.pout \
                 $(call strip-plugin,$<), \
        "$* on $(TARGET_NAME)")
@@ -168,7 +169,7 @@ run-plugin-%:
        $(call run-test, $@, \
          $(QEMU) -monitor none -display none \
                  -chardev file$(COMMA)path=$@.out$(COMMA)id=output \
-                 -plugin $(PLUGIN_DIR)/$(call extract-plugin,$@) \
+                 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
                  -d plugin -D $*.pout \
                  $(QEMU_OPTS) $(call strip-plugin,$<), \
          "$* on $(TARGET_NAME)")
index 312f36cde5f90fbf720d6ef362648b90eab482da..6d60a2f2eed964e9c73a5d97fed9fc61e59545a2 100644 (file)
@@ -31,7 +31,7 @@ run-semihosting: semihosting
 
 run-plugin-semihosting-with-%:
        $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
-               -plugin $(PLUGIN_DIR)/$(call extract-plugin,$@) \
+               -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
                 $(call strip-plugin,$<) 2> $<.err, \
                "$< on $(TARGET_NAME) with $*")
 
index 3da09a38be7d31d2665f37cedb2376385c260456..ec951565626b3a319912f90b017fa44103789894 100644 (file)
@@ -45,7 +45,7 @@ run-semihosting-arm: semihosting-arm
 
 run-plugin-semihosting-with-%:
        $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
-               -plugin $(PLUGIN_DIR)/$(call extract-plugin,$@) \
+               -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
                 $(call strip-plugin,$<) 2> $<.err, \
                "$< on $(TARGET_NAME) with $*")