r54320 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54319‎ | r54320 | r54321 >
Date:22:55, 3 August 2009
Author:brion
Status:deferred
Tags:
Comment:
fixups
Modified paths:
  • /trunk/tools/checkin-test-trigger/config.php (modified) (history)
  • /trunk/tools/checkin-test-trigger/runQueue.php (modified) (history)

Diff [purge]

Index: trunk/tools/checkin-test-trigger/runQueue.php
@@ -12,7 +12,7 @@
1313 $revs = array();
1414 $dir = dir( $queueDir );
1515 while( ( $filename = $dir->read() ) !== false ) {
16 - if( preg_match( '^\d+$', $filename ) ) {
 16+ if( preg_match( '/^\d+$/', $filename ) ) {
1717 $revs[] = intval( $filename );
1818 }
1919 }
@@ -20,7 +20,7 @@
2121
2222 // Run through them in order and run tests, if applicable.
2323 sort( $revs );
24 -foreach( $revs as $rev ) {
 24+foreach( $revs as $revId ) {
2525 checkCommit( $revId );
2626 }
2727
@@ -28,14 +28,14 @@
2929
3030
3131 function checkCommit( $revId ) {
32 - global $targetRepo, $testSuites;
 32+ global $targetRepo, $testSuites, $queueDir;
3333 $repo = SubversionAdaptor::newFromRepo( $targetRepo );
3434
3535 // Check for changes which trigger our test suites...
3636 foreach( $testSuites as $suite ) {
3737 // Potentially expensive with multiple test sets, since we hit SVN for each one
38 - $log = $repo->getLog( $suite['path'], $revId, $revId );
39 - if( isset( $log['paths'] ) && count( $logs['paths'] ) ) {
 38+ $logs = $repo->getLog( $suite['path'], $revId, $revId );
 39+ if( isset( $log[0]['paths'] ) && count( $log[0]['paths'] ) ) {
4040 // There were changes to thsi path in this revision.
4141 // Schedule it for testing!
4242 echo "Running $suite[name] on $suite[path] r$revId...\n";
Index: trunk/tools/checkin-test-trigger/config.php
@@ -1,12 +1,12 @@
22 <?php
33
4 -$queueDir = "/var/spool/check-test-trigger";
 4+$queueDir = "/var/spool/checkin-test-trigger";
55 $targetRepo = "http://svn.wikimedia.org/svnroot/mediawiki";
66 $testSuites = array(
77 array(
88 'suite' => 'ParserTests',
99 'path' => '/trunk/phase3',
10 - 'localpath' => "$base/phase3",
 10+ 'localpath' => "/home/parsertests/phase3",
1111 'command' => 'php maintenance/parserTests.php --upload',
1212 ),
1313 /*

Status & tagging log