From 97b0134409146503e051faeb9e6eb4b808f6cb28 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Thu, 22 Feb 2024 16:50:30 -0300 Subject: [PATCH] 21461: Allows running individual spec files through `make`. Example: $ make integration-tests-in-docker SPECFILE=cypress/e2e/collection.cy.js Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- services/workbench2/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/services/workbench2/Makefile b/services/workbench2/Makefile index 0b0175a77d..1a68d6fd77 100644 --- a/services/workbench2/Makefile +++ b/services/workbench2/Makefile @@ -9,6 +9,9 @@ SHELL := /bin/bash GOPATH?=~/go APP_NAME?=arvados-workbench2 +# Cypress test file that can be passed to the integration-test target +SPECFILE?=ALL + # VERSION uses all the above to produce X.Y.Z.timestamp # something in the lines of 1.2.0.20180612145021, this will be the package version # it can be overwritten when invoking make as in make packages VERSION=1.2.0 @@ -82,7 +85,11 @@ unit-tests: yarn-install integration-tests: yarn-install check-arvados-directory yarn run cypress install +ifeq ($(SPECFILE), ALL) $(WORKSPACE)/tools/run-integration-tests.sh -a $(ARVADOS_DIRECTORY) +else + $(WORKSPACE)/tools/run-integration-tests.sh -a $(ARVADOS_DIRECTORY) -- --spec $(SPECFILE) +endif integration-tests-in-docker: workbench2-build-image check-arvados-directory docker run -ti --rm \ @@ -92,7 +99,7 @@ integration-tests-in-docker: workbench2-build-image check-arvados-directory -v $(ARVADOS_DIRECTORY):/usr/src/arvados \ -w /usr/src/arvados/services/workbench2 \ workbench2-build \ - make arvados-server-install integration-tests + make arvados-server-install integration-tests SPECFILE=$(SPECFILE) unit-tests-in-docker: workbench2-build-image check-arvados-directory docker run -ti --rm \ -- 2.30.2