Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/187638

Change subject: Update mediawiki-core-qunit to use mw-set-env-qunit.sh
......................................................................

Update mediawiki-core-qunit to use mw-set-env-qunit.sh

For the old slave-scripts/wmfgrunt-based job these aren't strictly
needed as it can know the localhost already (though it's better to
not duplicate this between jobs).

This in in preparation for the Karma-based job where all logic
is inside MediaWiki core, which shouldn't have knowledge of the
Jenkins-specific install as it would differ from developer's
local install.

Change-Id: Ib722b79777e700f8142e9b5b2d468bccc097630e
---
M jjb/macro.yaml
M jjb/mediawiki.yaml
2 files changed, 6 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/38/187638/1

diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 7fcd9f6..07a2348 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -317,23 +317,15 @@
     name: prepare-qunit-localhost
     builders:
      - shell: |
-        # Load context (namely: MW_INSTALL_PATH)
-        . "/srv/deployment/integration/slave-scripts/bin/mw-set-env.sh"
+        # Load context (e.g. MW_INSTALL_PATH, MW_SERVER, MW_SCRIPT_PATH)
+        . /srv/deployment/integration/slave-scripts/bin/mw-set-env-qunit.sh
 
         # Configure MediaWiki
         echo -e \
-         "<?php\n\$wgServer = 'http://localhost:9412';\n"\
-         "\$wgScriptPath = '/${BUILD_TAG}';\n"\
+         "<?php\n\$wgServer = '${MW_SERVER}';\n"\
+         "\$wgScriptPath = '${MW_SCRIPT_PATH}';\n"\
          "\$wgScript = \$wgStylePath = \$wgLogo = false;\n"\
          "\$wgEnableJavaScriptTest = true;\n" >> 
"$MW_INSTALL_PATH/LocalSettings.php"
-
-        # Make sure to compress MediaWiki log dir after phpunit has ran
-        function compress_log_dir() {
-            LOG_DIR="$WORKSPACE/log"
-            echo "Compressing logs under $LOG_DIR"
-            gzip --verbose --force --best "$LOG_DIR"/*.log || :
-        }
-        trap compress_log_dir EXIT
 
         # The location is free or we make it free
         test ! -e /srv/localhost/qunit/$BUILD_TAG || rm 
/srv/localhost/qunit/$BUILD_TAG;
@@ -342,8 +334,8 @@
         ln -s "$MW_INSTALL_PATH" /srv/localhost/qunit/$BUILD_TAG
 
         # Fetch headers and content preview for debugging (HTTP 500 Error, 
Database error, ResourceLoader etc.)
-        curl --include 
"http://localhost:9412/$BUILD_TAG/index.php?title=Special:BlankPage"; | head -n42
-        curl --include 
"http://localhost:9412/$BUILD_TAG/load.php?debug=true&modules=startup&only=scripts";
 | head -n42
+        curl --include 
"$MW_SERVER/$MW_SCRIPT_PATH/index.php?title=Special:BlankPage" | head -n42
+        curl --include 
"MW_SERVER/$MW_SCRIPT_PATH/load.php?debug=true&modules=startup&only=scripts" | 
head -n42
 
 # qunit
 #
diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index 77270d4..593a707 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -20,7 +20,6 @@
      - jshint
      - jsonlint
 
-# Generic job to run QUnit
 - job-template:
     name: '{name}-qunit'
     node: contintLabsSlave && UbuntuPrecise

-- 
To view, visit https://gerrit.wikimedia.org/r/187638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib722b79777e700f8142e9b5b2d468bccc097630e
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to