r94359 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94358‎ | r94359 | r94360 >
Date:16:12, 12 August 2011
Author:krinkle
Status:ok
Tags:
Comment:
Update our TestSwarm's check out script for r94358.
Modified paths:
  • /trunk/tools/testswarm/scripts/testswarm-mediawiki-svn.php (modified) (history)

Diff [purge]

Index: trunk/tools/testswarm/scripts/testswarm-mediawiki-svn.php
@@ -99,8 +99,8 @@
100100 # All the suites that you wish to run within this job
101101 # (can be any number of suites)
102102
103 -## Comment out to insert static suite list here (ie. QUnit modules)
104 -#$suites = array(
 103+## Dynamically generated later on based on glob() for "{qunitDir}/suites/resources/*/*.js"
 104+#$filenames = array(
105105 # 'foo.js',
106106 # 'bar.util.js',
107107 # 'jquery.baz.js',
@@ -108,7 +108,7 @@
109109
110110 $curlOpts = array(
111111 CURLOPT_RETURNTRANSFER => 1,
112 - CURLOPT_USERAGENT => 'TestSwarm/20110511 (Wikimedia Toolserver; toolserver.org/~krinkle) Contact/krinkle@toolserver.org',
 112+ CURLOPT_USERAGENT => 'TestSwarm/Build20110812 (Wikimedia Toolserver; toolserver.org/~krinkle) Contact/krinkle@toolserver.org',
113113 CURLOPT_POST => true,
114114 );
115115
@@ -205,7 +205,7 @@
206206 # Get array of modules
207207
208208 $unitDir = glob( "$revTargetTmpDir/{$svnCoRepoInfo['qunitDir']}/suites/resources/*/*.js" );
209 - $suites = array_map( 'basename', $unitDir );
 209+ $filenames = array_map( 'basename', $unitDir );
210210
211211 # Add jobs
212212
@@ -223,10 +223,15 @@
224224
225225 $query = http_build_query( $params );
226226
227 - foreach ( $suites as $suite ) {
228 - $suiteName = substr( $suite, -8 ) == '.test.js' ? substr( $suite, 0, -8 ) : $suite;
229 - $query .= "&suites[]=" . rawurlencode( $suite ) .
230 - "&urls[]=" . getTestUrl( $svnHeadRevTop, $suite );
 227+ foreach ( $filenames as $filename ) {
 228+ # Switch-over period is done, QUnit module()-calls must now be filename without '.test.js'
 229+ #$suiteName = substr( $filename, -8 ) == '.test.js' ? substr( $filename, 0, -8 ) : $filename;
 230+ if ( substr( $filename, -8 ) == '.test.js' ) {
 231+ $suiteName = substr( $filename, 0, -8 );
 232+ $query .=
 233+ "&suites[]=" . rawurlencode( $suiteName ) .
 234+ "&urls[]=" . getTestUrl( $svnHeadRevTop, $suiteName );
 235+ }
231236 }
232237
233238 logger( "cURL url: $swarmUrl" );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94358Renaming qunit test files to end in ".test.js" (finally!)...krinkle16:02, 12 August 2011

Status & tagging log