From: Brion Vibber Date: Fri, 19 Jan 2007 09:00:45 +0000 (+0000) Subject: Prettify test runner a bit: X-Git-Tag: 1.31.0-rc.0~54303 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=a8f6c1efc39ddcfc8f06dba46993f9a4b2c07eb2;p=lhc%2Fweb%2Fwiklou.git Prettify test runner a bit: * cleaner line breaks at start and end * 'ALL TESTS PASSED!' and 'some tests failed!' so people stop whinging about the giant 'FAILED!' and remove some redundant includes --- diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 3559b98346..7df2c705b5 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -29,9 +29,6 @@ $options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record' ); $optionsWithArgs = array( 'regex' ); require_once( 'commandLine.inc' ); -require_once( "$IP/includes/ObjectCache.php" ); -require_once( "$IP/includes/BagOStuff.php" ); -require_once( "$IP/includes/Hooks.php" ); require_once( "$IP/maintenance/parserTestsParserHook.php" ); require_once( "$IP/maintenance/parserTestsStaticParserHook.php" ); require_once( "$IP/maintenance/parserTestsParserTime.php" ); @@ -932,9 +929,9 @@ class TestRecorder { $ratio = wfPercent( 100 * $success / $total ); print $this->term->color( 1 ) . "Passed $success of $total tests ($ratio)... "; if( $success == $total ) { - print $this->term->color( 32 ) . "PASSED!"; + print $this->term->color( 32 ) . "ALL TESTS PASSED!"; } else { - print $this->term->color( 31 ) . "FAILED!"; + print $this->term->color( 31 ) . "some tests failed!"; } print $this->term->reset() . "\n"; return ($success == $total); @@ -1031,6 +1028,7 @@ class DbTestRecorder extends TestRecorder { } else { print "No previous test runs to compare against.\n"; } + print "\n"; parent::report(); } diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index efdd07c425..274356f18e 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -64,7 +64,7 @@ if( isset( $options['file'] ) ) { # Print out software version to assist with locating regressions $version = SpecialVersion::getVersion(); -echo( "This is MediaWiki version {$version}.\n" ); +echo( "This is MediaWiki version {$version}.\n\n" ); $ok = $tester->runTestsFromFiles( $files ); exit ($ok ? 0 : -1);