Index: trunk/tools/checkin-test-trigger/runQueue.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | $revs = array(); |
14 | 14 | $dir = dir( $queueDir ); |
15 | 15 | while( ( $filename = $dir->read() ) !== false ) { |
16 | | - if( preg_match( '^\d+$', $filename ) ) { |
| 16 | + if( preg_match( '/^\d+$/', $filename ) ) { |
17 | 17 | $revs[] = intval( $filename ); |
18 | 18 | } |
19 | 19 | } |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | |
22 | 22 | // Run through them in order and run tests, if applicable. |
23 | 23 | sort( $revs ); |
24 | | -foreach( $revs as $rev ) { |
| 24 | +foreach( $revs as $revId ) { |
25 | 25 | checkCommit( $revId ); |
26 | 26 | } |
27 | 27 | |
— | — | @@ -28,14 +28,14 @@ |
29 | 29 | |
30 | 30 | |
31 | 31 | function checkCommit( $revId ) { |
32 | | - global $targetRepo, $testSuites; |
| 32 | + global $targetRepo, $testSuites, $queueDir; |
33 | 33 | $repo = SubversionAdaptor::newFromRepo( $targetRepo ); |
34 | 34 | |
35 | 35 | // Check for changes which trigger our test suites... |
36 | 36 | foreach( $testSuites as $suite ) { |
37 | 37 | // 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'] ) ) { |
40 | 40 | // There were changes to thsi path in this revision. |
41 | 41 | // Schedule it for testing! |
42 | 42 | echo "Running $suite[name] on $suite[path] r$revId...\n"; |
Index: trunk/tools/checkin-test-trigger/config.php |
— | — | @@ -1,12 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -$queueDir = "/var/spool/check-test-trigger"; |
| 4 | +$queueDir = "/var/spool/checkin-test-trigger"; |
5 | 5 | $targetRepo = "http://svn.wikimedia.org/svnroot/mediawiki"; |
6 | 6 | $testSuites = array( |
7 | 7 | array( |
8 | 8 | 'suite' => 'ParserTests', |
9 | 9 | 'path' => '/trunk/phase3', |
10 | | - 'localpath' => "$base/phase3", |
| 10 | + 'localpath' => "/home/parsertests/phase3", |
11 | 11 | 'command' => 'php maintenance/parserTests.php --upload', |
12 | 12 | ), |
13 | 13 | /* |