jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I7d242811ed42f728d547c3cc985496d4a0a3f583
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to