#!/usr/bin/php . */ // Tests are like gods, they can run an infinite time, eat all the memory and kill kittens ini_set('max_execution_time', 0); ini_set('memory_limit', -1); require_once dirname(__FILE__).'/../../plugins/tests/www/tests_common.php'; require_once(dirname(__FILE__).'/../../plugins/tests/include/TestsPluginReporter.class.php'); require_once(dirname(__FILE__).'/../../plugins/tests/www/TuleapTestSuite.class.php'); // Start $options = getopt('x'); $format = 'console'; if (isset($options['x'])) { $format = 'checkstyle'; foreach ($_SERVER['argv'] as $key => $value) { if ($value == '-x') { unset($_SERVER['argv'][$key]); } } } if ($format == 'checkstyle') { $reporter = TestsPluginReporterFactory::reporter('junit_xml', true); } else { $reporter = new ColorTextReporter(); } // remove command name from argument list array_shift($_SERVER['argv']); $suite = new TuleapTestSuite($_SERVER['argv']); $status = $suite->run($reporter); if ($format == 'checkstyle') { $reporter->writeXML('unit_tests_report.xml'); } // Return test suite status for usage in git bisect if ($status === false) { exit(1); } else { exit(0); } ?>