Index: trunk/tools/testswarm/scripts/testswarm-mediawiki-svn.php |
— | — | @@ -99,8 +99,8 @@ |
100 | 100 | # All the suites that you wish to run within this job |
101 | 101 | # (can be any number of suites) |
102 | 102 | |
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( |
105 | 105 | # 'foo.js', |
106 | 106 | # 'bar.util.js', |
107 | 107 | # 'jquery.baz.js', |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | |
110 | 110 | $curlOpts = array( |
111 | 111 | 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', |
113 | 113 | CURLOPT_POST => true, |
114 | 114 | ); |
115 | 115 | |
— | — | @@ -205,7 +205,7 @@ |
206 | 206 | # Get array of modules |
207 | 207 | |
208 | 208 | $unitDir = glob( "$revTargetTmpDir/{$svnCoRepoInfo['qunitDir']}/suites/resources/*/*.js" ); |
209 | | - $suites = array_map( 'basename', $unitDir ); |
| 209 | + $filenames = array_map( 'basename', $unitDir ); |
210 | 210 | |
211 | 211 | # Add jobs |
212 | 212 | |
— | — | @@ -223,10 +223,15 @@ |
224 | 224 | |
225 | 225 | $query = http_build_query( $params ); |
226 | 226 | |
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 | + } |
231 | 236 | } |
232 | 237 | |
233 | 238 | logger( "cURL url: $swarmUrl" ); |