* * @author Masaki Fujimoto <*****@*****.**> * @license http://www.opensource.org/licenses/bsd-license.php The BSD License * @package Ethna * @version $Id: 7f8f5b31c83b87ac69d9f6195ba27157efb2fe5f $ */ while (ob_get_level()) { ob_end_clean(); } $base = dirname(dirname(dirname(__FILE__))); ini_set('include_path', $base . PATH_SEPARATOR . ini_get('include_path')); require_once 'Ethna/Ethna.php'; require_once ETHNA_BASE . '/class/Getopt.php'; // fetch arguments $opt = new Ethna_Getopt(); $arg_list = $opt->readPHPArgv(); if (Ethna::isError($arg_list)) { echo $arg_list->getMessage() . "\n"; exit(2); } array_shift($arg_list); // remove "ethna_handle.php" $eh = new Ethna_Handle(); // はじめの引数に - が含まれていればそれを分離する // 含まれていた場合、それは -v|--version でなければならない list($my_arg_list, $arg_list) = _Ethna_HandleGateway_SeparateArgList($arg_list); $r = $opt->getopt($my_arg_list, "v", array("version")); if (Ethna::isError($r)) { $id = 'help'; } else { // ad-hoc:(
//ini_set('include_path', realpath(ETHNA_INSTALL_BASE . '/class') . PATH_SEPARATOR . ini_get('include_path')); ini_set('include_path', realpath(dirname(ETHNA_INSTALL_BASE)) . PATH_SEPARATOR . ini_get('include_path')); /** Ethna関連クラスのインクルード */ require_once 'Ethna/Ethna.php'; // simpletest を使っているため、E_DEPRECATED, E_STRICT は解除 error_reporting(error_reporting() ^ E_DEPRECATED ^ E_STRICT); /** SimpleTestのインクルード */ require_once 'simpletest/unit_tester.php'; require_once 'simpletest/reporter.php'; require_once $test_dir . '/TextDetailReporter.php'; require_once $test_dir . '/UnitTestBase.php'; $test = new GroupTest('Ethna All tests'); // テストケースのファイルリストを取得 require_once 'Ethna/class/Getopt.php'; $opt = new Ethna_Getopt(); $args = $opt->readPHPArgv(); list($args, $opts) = $opt->getopt($args, '', array()); array_shift($opts); if (count($opts) > 0) { $file_list = $opts; } else { $file_list = getFileList($test_dir); } // テストケースを登録 foreach ($file_list as $file) { $test->addTestFile($file); } // 結果をコマンドラインに出力 $test->run(new TextDetailReporter()); if ($symlink_filename !== null && is_link($symlink_filename)) { unlink($symlink_filename);