Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/90336
Change subject: mw-run-phpunit*: make sure we compress mw log files
......................................................................
mw-run-phpunit*: make sure we compress mw log files
MediaWiki output debug logs under $WORKSPACE/log, we want to gzip them
before archiving.
Change-Id: I7d242811ed42f728d547c3cc985496d4a0a3f583
---
M bin/mw-run-phpunit-allexts.sh
M bin/mw-run-phpunit.sh
2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins
refs/changes/36/90336/1
diff --git a/bin/mw-run-phpunit-allexts.sh b/bin/mw-run-phpunit-allexts.sh
index 66e5c2f..6f9d1f4 100755
--- a/bin/mw-run-phpunit-allexts.sh
+++ b/bin/mw-run-phpunit-allexts.sh
@@ -10,6 +10,13 @@
mkdir -p "$LOG_DIR"
JUNIT_DEST="$LOG_DIR/junit-phpunit-allexts.xml"
+# Make sure to compress MediaWiki log dir after phpunit has ran
+function compress_log_dir() {
+ echo "Compressing logs under $LOG_DIR"
+ gzip --verbose --best "$LOG_DIR"/*.log
+}
+trap compress_log_dir EXIT
+
# We have to move to the tests/phpunit directory where suite.xml is located or
# the relative paths referenced in that file will not get properly resolved by
# PHPUnit
diff --git a/bin/mw-run-phpunit.sh b/bin/mw-run-phpunit.sh
index eeeed57..759664f 100755
--- a/bin/mw-run-phpunit.sh
+++ b/bin/mw-run-phpunit.sh
@@ -28,6 +28,13 @@
mkdir -p "$LOG_DIR"
JUNIT_DEST="$LOG_DIR/junit-mw-phpunit.xml"
+# Make sure to compress MediaWiki log dir after phpunit has ran
+function compress_log_dir() {
+ echo "Compressing logs under $LOG_DIR"
+ gzip --verbose --best "$LOG_DIR"/*.log
+}
+trap compress_log_dir EXIT
+
#######################################################################
# Start of code
#######################################################################
--
To view, visit https://gerrit.wikimedia.org/r/90336
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d242811ed42f728d547c3cc985496d4a0a3f583
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits