Index: trunk/phase3/tests/parserTests.php |
— | — | @@ -51,7 +51,6 @@ |
52 | 52 | --seed <n> Start the fuzz test from the specified seed |
53 | 53 | --help Show this help message |
54 | 54 | --run-disabled run disabled tests |
55 | | - --upload Upload test results to remote wiki (per \$wgParserTestRemote) |
56 | 55 | |
57 | 56 | ENDS; |
58 | 57 | exit( 0 ); |
Index: trunk/phase3/tests/testHelpers.inc |
— | — | @@ -349,99 +349,6 @@ |
350 | 350 | } |
351 | 351 | } |
352 | 352 | |
353 | | -class RemoteTestRecorder extends TestRecorder { |
354 | | - function start() { |
355 | | - parent::start(); |
356 | | - |
357 | | - $this->results = array(); |
358 | | - $this->ping( 'running' ); |
359 | | - } |
360 | | - |
361 | | - function record( $test, $result ) { |
362 | | - parent::record( $test, $result ); |
363 | | - $this->results[$test] = (bool)$result; |
364 | | - } |
365 | | - |
366 | | - function end() { |
367 | | - $this->ping( 'complete', $this->results ); |
368 | | - parent::end(); |
369 | | - } |
370 | | - |
371 | | - /** |
372 | | - * Inform a CodeReview instance that we've started or completed a test run... |
373 | | - * |
374 | | - * @param $status string: "running" - tell it we've started |
375 | | - * "complete" - provide test results array |
376 | | - * "abort" - something went horribly awry |
377 | | - * @param $results array of test name => true/false |
378 | | - */ |
379 | | - function ping( $status, $results = false ) { |
380 | | - global $wgParserTestRemote, $IP; |
381 | | - |
382 | | - $remote = $wgParserTestRemote; |
383 | | - $revId = SpecialVersion::getSvnRevision( $IP ); |
384 | | - $jsonResults = FormatJson::encode( $results ); |
385 | | - |
386 | | - if ( !$remote ) { |
387 | | - print "Can't do remote upload without configuring \$wgParserTestRemote!\n"; |
388 | | - exit( 1 ); |
389 | | - } |
390 | | - |
391 | | - // Generate a hash MAC to validate our credentials |
392 | | - $message = array( |
393 | | - $remote['repo'], |
394 | | - $remote['suite'], |
395 | | - $revId, |
396 | | - $status, |
397 | | - ); |
398 | | - |
399 | | - if ( $status == "complete" ) { |
400 | | - $message[] = $jsonResults; |
401 | | - } |
402 | | - $hmac = hash_hmac( "sha1", implode( "|", $message ), $remote['secret'] ); |
403 | | - |
404 | | - $postData = array( |
405 | | - 'action' => 'codetestupload', |
406 | | - 'format' => 'json', |
407 | | - 'repo' => $remote['repo'], |
408 | | - 'suite' => $remote['suite'], |
409 | | - 'rev' => $revId, |
410 | | - 'status' => $status, |
411 | | - 'hmac' => $hmac, |
412 | | - ); |
413 | | - |
414 | | - if ( $status == "complete" ) { |
415 | | - $postData['results'] = $jsonResults; |
416 | | - } |
417 | | - |
418 | | - $response = $this->post( $remote['api-url'], $postData ); |
419 | | - |
420 | | - if ( $response === false ) { |
421 | | - print "CodeReview info upload failed to reach server.\n"; |
422 | | - exit( 1 ); |
423 | | - } |
424 | | - |
425 | | - $responseData = FormatJson::decode( $response, true ); |
426 | | - |
427 | | - if ( !is_array( $responseData ) ) { |
428 | | - print "CodeReview API response not recognized...\n"; |
429 | | - wfDebug( "Unrecognized CodeReview API response: $response\n" ); |
430 | | - exit( 1 ); |
431 | | - } |
432 | | - |
433 | | - if ( isset( $responseData['error'] ) ) { |
434 | | - $code = $responseData['error']['code']; |
435 | | - $info = $responseData['error']['info']; |
436 | | - print "CodeReview info upload failed: $code $info\n"; |
437 | | - exit( 1 ); |
438 | | - } |
439 | | - } |
440 | | - |
441 | | - function post( $url, $data ) { |
442 | | - return Http::post( $url, array( 'postData' => $data ) ); |
443 | | - } |
444 | | -} |
445 | | - |
446 | 353 | class TestFileIterator implements Iterator { |
447 | 354 | private $file; |
448 | 355 | private $fh; |
Index: trunk/phase3/tests/parser/parserTest.inc |
— | — | @@ -185,8 +185,6 @@ |
186 | 186 | $options['setversion'] : SpecialVersion::getVersion(); |
187 | 187 | } elseif ( isset( $options['compare'] ) ) { |
188 | 188 | $this->recorder = new DbTestPreviewer( $this ); |
189 | | - } elseif ( isset( $options['upload'] ) ) { |
190 | | - $this->recorder = new RemoteTestRecorder( $this ); |
191 | 189 | } else { |
192 | 190 | $this->recorder = new TestRecorder( $this ); |
193 | 191 | } |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -846,7 +846,6 @@ |
847 | 847 | 'DbTestPreviewer' => 'tests/testHelpers.inc', |
848 | 848 | 'DbTestRecorder' => 'tests/testHelpers.inc', |
849 | 849 | 'DummyTermColorer' => 'tests/testHelpers.inc', |
850 | | - 'RemoteTestRecorder' => 'tests/testHelpers.inc', |
851 | 850 | 'TestFileIterator' => 'tests/testHelpers.inc', |
852 | 851 | 'TestRecorder' => 'tests/testHelpers.inc', |
853 | 852 | |