From feed100337e2222c4656901d11c2f80a0e667002 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 6 Mar 2013 16:38:38 -0500 Subject: Revert "Return "1" to CLI if not all unit tests pass.". We're not successfully passing back $all_passed because the function doesn't take it by reference. Which is my fault because I gave Jozefs bad advice. But I don't think it's necessary anyway so I'm going to try a different approach. This reverts commit 4fe07c6b0a341b0b99ee1b051f7c0bdfda572e04. Conflicts: modules/gallery_unit_test/controllers/gallery_unit_test.php --- modules/gallery_unit_test/controllers/gallery_unit_test.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'modules/gallery_unit_test') diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php index cf2f7c99..67d006b3 100644 --- a/modules/gallery_unit_test/controllers/gallery_unit_test.php +++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php @@ -27,9 +27,6 @@ class Gallery_Unit_Test_Controller extends Controller { ini_set("display_errors", true); error_reporting(-1); - // Track whether all tests pass so we can return an appropriate code to the CLI - $all_tests_passed = false; - // Jump through some hoops to satisfy the way that we check for the site_domain in // config.php. We structure this such that the code in config will leave us with a // site_domain of "." (for historical reasons) @@ -135,7 +132,7 @@ class Gallery_Unit_Test_Controller extends Controller { graphics::choose_default_toolkit(); $filter = count($_SERVER["argv"]) > 2 ? $_SERVER["argv"][2] : null; - print new Unit_Test($modules, $filter, $all_tests_passed); + print new Unit_Test($modules, $filter); } catch (ORM_Validation_Exception $e) { print "Validation Exception: {$e->getMessage()}\n"; print $e->getTraceAsString() . "\n"; @@ -146,13 +143,5 @@ class Gallery_Unit_Test_Controller extends Controller { print "Exception: {$e->getMessage()}\n"; print $e->getTraceAsString() . "\n"; } - - // Let the CLI caller know whether all tests passed or not, - // to allow usage of continuous integration servers. - if (PHP_SAPI == 'cli') { - $exit_status = $all_tests_passed ? 0 : 1; - print "Exit: $exit_status\n"; - exit($exit_status); - } } } -- cgit v1.2.3