jenkins-bot has submitted this change and it was merged.
Change subject: Separate mw-selenium setup/teardown and be strict
......................................................................
Separate mw-selenium setup/teardown and be strict
Reimplemented mw-selenium-teardown as separate setup/teardown scripts
that mkdir/rm respectively. Refactored TMPDIR workaround in
mw-set-env-mw-selenium to simply reuse global-set-env but set a flag
instructing the latter to skip assignment of TMPDIR to the tmpfs path.
Change-Id: If13aadef929d4b2e7682cc5c2bbe79e474b7c3ba
Follow-up: I49216b4985f911ef273751976c2c73bdcb43f502
---
M bin/global-set-env.sh
A bin/mw-selenium-setup.sh
M bin/mw-selenium-teardown.sh
M bin/mw-set-env-mw-selenium.sh
4 files changed, 16 insertions(+), 12 deletions(-)
Approvals:
Dduvall: Looks good to me, approved
Hashar: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/bin/global-set-env.sh b/bin/global-set-env.sh
index 55d3e45..15a3d8e 100755
--- a/bin/global-set-env.sh
+++ b/bin/global-set-env.sh
@@ -3,7 +3,11 @@
# Don't use JOB_NAME since that is not unique when running concurrent builds
(T91070).
# Don't use a path longer than 55 characters in total. Chromium needs 45
characters
# for its user-data directory and socket. 103 is the Unix maxlength for socket
paths (T93330).
-if [ -d "$HOME/tmpfs" ]; then
+#
+# Dependent scripts/builders that have issues related to tmpfs, or a non-root
+# temporary filesystem, can set `SKIP_TMPFS` to keep keep the temporary
+# directory under /tmp.
+if [ -d "$HOME/tmpfs" ] && [ -z "$SKIP_TMPFS" ]; then
# All slaves should have tmpfs mounted, use if available
export TMPDIR="$HOME/tmpfs/jenkins-${EXECUTOR_NUMBER}"
else
diff --git a/bin/mw-selenium-setup.sh b/bin/mw-selenium-setup.sh
new file mode 100755
index 0000000..949f2f9
--- /dev/null
+++ b/bin/mw-selenium-setup.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -eu
+
+. /srv/deployment/integration/slave-scripts/bin/mw-set-env-mw-selenium.sh
+
+mkdir -p "$TMPDIR"
diff --git a/bin/mw-selenium-teardown.sh b/bin/mw-selenium-teardown.sh
index 1a0e036..a8af718 100755
--- a/bin/mw-selenium-teardown.sh
+++ b/bin/mw-selenium-teardown.sh
@@ -2,9 +2,4 @@
. /srv/deployment/integration/slave-scripts/bin/mw-set-env-mw-selenium.sh
-# Cleanup/recreate the TMPDIR since it's not a tmpfs location
-if test -d "$TMPDIR"; then
- rm -rf "$TMPDIR"
-fi
-
-mkdir "$TMPDIR"
+rm -rf "$TMPDIR"
diff --git a/bin/mw-set-env-mw-selenium.sh b/bin/mw-set-env-mw-selenium.sh
index 2a3eaae..a6375d9 100755
--- a/bin/mw-set-env-mw-selenium.sh
+++ b/bin/mw-set-env-mw-selenium.sh
@@ -1,5 +1,10 @@
#!/bin/bash -eu
+# Xvfb barfs when trying to move xkb files across filesystems, so we must use
+# /tmp for now
+# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/972324
+export SKIP_TMPFS=1
+
. /srv/deployment/integration/slave-scripts/bin/mw-set-env-localhost.sh
# Selenium requires the chromedriver binary to be found in our PATH
@@ -14,11 +19,6 @@
export HEADLESS=true
export HEADLESS_DISPLAY=$((70 + EXECUTOR_NUMBER % 20))
export HEADLESS_DESTROY_AT_EXIT=true
-
-# Xvfb barfs when trying to move xkb files across filesystems, so we must use
-# /tmp for this job
-# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/972324
-export TMPDIR="/tmp/jenkins-${EXECUTOR_NUMBER}"
export MEDIAWIKI_ENVIRONMENT=integration
export MEDIAWIKI_URL="${MW_SERVER}${MW_SCRIPT_PATH}/index.php/"
--
To view, visit https://gerrit.wikimedia.org/r/224456
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If13aadef929d4b2e7682cc5c2bbe79e474b7c3ba
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Dduvall <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits