Page MenuHomeSoftware Heritage

D8782.id31650.diff
No OneTemporary

D8782.id31650.diff

diff --git a/jobs/templates/includes/stage-cypress-tests.groovy.j2 b/jobs/templates/includes/stage-cypress-tests.groovy.j2
--- a/jobs/templates/includes/stage-cypress-tests.groovy.j2
+++ b/jobs/templates/includes/stage-cypress-tests.groovy.j2
@@ -74,6 +74,11 @@
# copy database file to the one that will be used by django for that test runner
cp swh-web-test.sqlite3 swh-web-test{{ n }}.sqlite3
+ # prevent a race condition when multiple cypress processes load the same support file in parallel
+ # as copy operations are performed
+ cp cypress/support/e2e.js cypress/support/e2e{{ n }}.js
+ sed -i "s/supportFile: 'cypress\\/support\\/e2e.js'/supportFile: 'cypress\\/support\\/e2e{{ n }}.js'/" cypress.config.js
+
# run django server on a dedicated port for that test runner and wait for it to be up
python3 swh/web/manage.py runserver --nostatic --settings=swh.web.settings.tests 0.0.0.0:500{{ n }}&
wait-for-it -t 90 localhost:500{{ n }}

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 20, 7:40 PM (3 w, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213966

Event Timeline