21461: Allows running individual spec files through `make`.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 22 Feb 2024 19:50:30 +0000 (16:50 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 22 Feb 2024 20:19:21 +0000 (17:19 -0300)
Example:

$ make integration-tests-in-docker SPECFILE=cypress/e2e/collection.cy.js

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

services/workbench2/Makefile

index 0b0175a77d199fd48e31bfec5d58b7b515c14092..1a68d6fd77c7ca8b52007ce6b0f174ef97947425 100644 (file)
@@ -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 \