|
4072 - trunk/Template/tests [eZComponents: Trunk]: msg#00241web.ezcomponents.cvs
Author: Jan Borsodi Date: 2006-11-27 11:06:15 +0100 (Mon, 27 Nov 2006) New Revision: 4072 Log: - Added new interactive command "r" to retry to the current test in regression test. Modified: trunk/Template/tests/regression_test.php Modified: trunk/Template/tests/regression_test.php =================================================================== --- trunk/Template/tests/regression_test.php 2006-11-27 10:06:15 UTC (rev 4071) +++ trunk/Template/tests/regression_test.php 2006-11-27 10:06:15 UTC (rev 4072) @@ -31,6 +31,8 @@ public $regressionDir = ''; + private $retryTest = false; + private $stdin = null; public function __construct() @@ -89,16 +91,21 @@ { $result->startTest($this); - try { - $this->testRunRegression( $directory ); - } + $this->retryTest = true; + while ( $this->retryTest ) + { + try { + $this->retryTest = false; + $this->testRunRegression( $directory ); + } - catch (PHPUnit_Framework_AssertionFailedError $e) { - $result->addFailure($this, $e, time() ); - } + catch (PHPUnit_Framework_AssertionFailedError $e) { + $result->addFailure($this, $e, time() ); + } - catch (Exception $e) { - $result->addError($this, $e, time() ); + catch (Exception $e) { + $result->addError($this, $e, time() ); + } } $result->endTest($this, time()); @@ -157,7 +164,7 @@ while ( true ) { - echo "Action (g/s/o/e/st/sp/tt/at/d/a/v/q/?): "; + echo "Action (g/s/r/o/e/st/sp/tt/at/d/a/v/q/?): "; $reply = strtolower( trim( fgets( $this->stdin ) ) ); @@ -179,6 +186,11 @@ continue; } + elseif ( $reply == "r" ) + { + $this->retryTest = true; + return; + } elseif ( $reply == "g" ) { file_put_contents( $expectedFile, $actual ); |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | 4070 - trunk/Template/tests/regression_tests/array_append [eZComponents: Trunk]: 00241, Jan Borsodi |
|---|---|
| Next by Date: | 4071 - trunk/Database/src/sqlabstraction [eZComponents: Trunk]: 00241, Derick Rethans |
| Previous by Thread: | 4070 - trunk/Template/tests/regression_tests/array_append [eZComponents: Trunk]i: 00241, Jan Borsodi |
| Next by Thread: | 4071 - trunk/Database/src/sqlabstraction [eZComponents: Trunk]: 00241, Derick Rethans |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |