[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests/vpci: install test
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Thu, 9 Mar 2023 17:58:12 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hNHbpjp0Ld0UShtinjWl6AvB/2PZfWRDtntaADSGqqE=; b=G2gUS4EJNDwVbjLoznXet3fIwd/YsbDYoSa3KDSMy8cPiJAJvLC+ggCJW7ftRi50jkYNv4xpvkZAdrY4fOiPp/sdH8TSzoaFVb0k8UFQS5VJkzSa2R2qRXbTD+6IlzxniNAKJJj9arKNh5hHfD6mGSQXTEYt8V+6FcHoJmzQrZbesWfNwTaW0BK7YR0maVTaKTTTNADHMbSzjrLB/u0n4ozsr0ETXuXJDqCmPocFo2NVmTNwjin3QmY4iKjCkLPWrcG+5GGzVcr7Q4yfihsp0xPNtpud1uwuMZ4ED6ACA0WeH+bk7xP+BF81rDrJXloKY24CBz+QwYGOQSSg3O3zEQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b4xLNReKfA0OkpVWGxzsFE8BaHwm8DMRFeEDuUjdMqmmdsC/udo29Qs4XdF6HjeSQDONO2bvuqnANqQtmP/m664NICGvghwUE6uxe116L3D9THFQ2rHYCeZYPFtNM0ceUrNULRnB4GmEIy6T+i8gA7uRs3j1AEs5Tm4dq1+LPx7vASw2qKPQLQ0zYdZtjIx6923xRpoRiCC+V/cNStxJYATUlF48X3KuXY4zfnI6FMRD6hGH6SxWtfmURf2PUBJ/y+Ztn3J9DAkcrbV3AobQoYq75Ul/R7eZZVkOFG6IWKwHddB06LMUhqZJmTjgWIaLRyblaIyurfGTUu4w+kPR5A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: andrew.cooper3@xxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Delivery-date: Thu, 09 Mar 2023 16:58:50 +0000
- Ironport-data: A9a23:nt5bgq2sSpzZjF3phPbD5cZwkn2cJEfYwER7XKvMYLTBsI5bpzQHy DAZC27VM//fYmvxfYt3aIW+8k4D6pXWx4BmTQtrpC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS+HuDgNyo4GlD5gdmNKgQ1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfXDEQ/ KMxdj0xdyub19228peBZfRBiZF2RCXrFNt3VnBI6xj8VK5jbbWdBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxqsy6KlFcZPLvFabI5fvSQQspYhACAr 3/u9GXlGBAKcteYzFJp91r13rWRxHKnB9J6+LuQrfFpp0fI4HMqAzZIEku2+emg0H+0cocKQ 6AT0m90xUQoz2S7Q9+4UxCmrXqsuh8HR8EWA+A88BuKyKff/0CeHGdsZiFFQMwrsokxXzNC6 7OSt9bgBDgqvLjLT3uYr++QtWnrYXNTKnIebygZSwdD+8PkvIw4khPISJBkDbKxidr2Xzr3x lhmsRQDulnatuZTv43TwLwNq2nESkThJuLt2jjqYw==
- Ironport-hdrordr: A9a23:eNR8A6PxF1GSHMBcT4D155DYdb4zR+YMi2TDGXoBMyC9E/bo6v xG+c516faaskd2ZJgfo6HMBEDtewK6yXcx2/h0AV9NNDOW8VdBAulZnMDfKhfbalrDHtc079 YpT0CVYOeAR2SS9PyKljVQcOxQouVvkprY/Ns2lE0dOT2CApsIh2wSZ2qm/1VNNXV77NgCZf +hD+V81nadkB8sH7yG7xc+LpP+TxyiruOVXffEPX8aAcu14w9AJISbL/AWti1uJg+nCI1Skl TtokjC/62mhfmw1x/b0Abonudrseqk8MJKAPqGgtN9EEScti+YIL55U7m1pzwtpvqzgWxa4O XkklMbJsx23WnaeHq4yCGdpTXI4XIV8nfn/0WTh2Dul8z/WVsBerV8ub4=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Introduce an install target, like it's used by other tests. This
allows running the test on the installed systems, which is easier than
running it during the build phase when dealing with automated testing.
Strictly speaking the vpci test doesn't require to be run on a Xen
host currently, but that allows easier integration with logic that
runs the rest of the tests.
While there also adjust the makefile to use $(RM), and rename the
resulting binary to use a dash instead of an underscore (again to
match the rest of the tests).
Since the resulting test binary is now part of the distribution CC
must be used instead of HOSTCC.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
XenRT has recently gained the ability to run the tests in tools/tests
that are installed, so the install target is needed for that use-case.
---
tools/tests/vpci/Makefile | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tools/tests/vpci/Makefile b/tools/tests/vpci/Makefile
index 5075bc2be2..3b85b689d3 100644
--- a/tools/tests/vpci/Makefile
+++ b/tools/tests/vpci/Makefile
@@ -1,7 +1,7 @@
XEN_ROOT=$(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
-TARGET := test_vpci
+TARGET := test-vpci
.PHONY: all
all: $(TARGET)
@@ -11,17 +11,23 @@ run: $(TARGET)
./$(TARGET)
$(TARGET): vpci.c vpci.h list.h main.c emul.h
- $(HOSTCC) -g -o $@ vpci.c main.c
+ $(CC) -o $@ vpci.c main.c
.PHONY: clean
clean:
- rm -rf $(TARGET) *.o *~ vpci.h vpci.c list.h
+ $(RM) -- $(TARGET) *.o *~ vpci.h vpci.c list.h
.PHONY: distclean
distclean: clean
.PHONY: install
-install:
+install: all
+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+ $(INSTALL_PROG) $(TARGET) $(DESTDIR)$(LIBEXEC_BIN)
+
+.PHONY: uninstall
+uninstall:
+ $(RM) -- $(DESTDIR)$(LIBEXEC_BIN)/$(TARGET)
vpci.c: $(XEN_ROOT)/xen/drivers/vpci/vpci.c
# Remove includes and add the test harness header
--
2.39.0
|