Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123021
D8821.id31811.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8821.id31811.diff
View Options
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
@@ -71,6 +71,12 @@
# force use of manually created X11 server
export DISPLAY=:99
+ # to avoid possible race conditions, each cypress runner will execute tests from
+ # a copy of the swh-web repository filesystem (without root hidden folders)
+ mkdir .swh-web{{ n }}
+ cp -r ./* .swh-web{{ n }}
+ cd .swh-web{{ n }}
+
# 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
@@ -82,8 +88,8 @@
yarn run cypress run --record --key swh-web --parallel --config baseUrl=http://localhost:500{{ n }} --ci-build-id $SORRY_CYPRESS_BUILD_ID
# copy nyc coverage outputs to dedicated merge folders for later processing
- cp cypress/coverage{{ n }}/coverage-final.json cypress/coverage_output/coverage-final{{ n }}.json
- cp .nyc_output{{ n }}/out.json .nyc_outputs/out{{ n }}.json
+ cp cypress/coverage{{ n }}/coverage-final.json ../cypress/coverage_output/coverage-final{{ n }}.json
+ cp .nyc_output{{ n }}/out.json ../.nyc_outputs/out{{ n }}.json
'''
},
{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 17, 4:07 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217990
Attached To
D8821: templates/stage-cypress-tests: Prevent race conditions between runners
Event Timeline
Log In to Comment