You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

641 lines
18 KiB

25 years ago
25 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
24 years ago
  1. <?php
  2. /*
  3. +----------------------------------------------------------------------+
  4. | PHP Version 4 |
  5. +----------------------------------------------------------------------+
  6. | Copyright (c) 1997-2002 The PHP Group |
  7. +----------------------------------------------------------------------+
  8. | This source file is subject to version 2.02 of the PHP license, |
  9. | that is bundled with this package in the file LICENSE, and is |
  10. | available at through the world-wide-web at |
  11. | http://www.php.net/license/2_02.txt. |
  12. | If you did not receive a copy of the PHP license and are unable to |
  13. | obtain it through the world-wide-web, please send a note to |
  14. | license@php.net so we can mail you a copy immediately. |
  15. +----------------------------------------------------------------------+
  16. | Authors: Ilia Alshanetsky <ilia@php.net> |
  17. | Preston L. Bannister <pbannister@php.net> |
  18. | Marcus Boerger <helly@php.net> |
  19. | Derick Rethans <derick@php.net> |
  20. | Sander Roobol <sander@php.net> |
  21. | (based on version by: Stig Bakken <ssb@fast.no>) |
  22. | (based on the PHP 3 test framework by Rasmus Lerdorf) |
  23. +----------------------------------------------------------------------+
  24. */
  25. /*
  26. Require exact specification of PHP executable to test (no guessing!).
  27. Die if any internal errors encountered in test script.
  28. Regularized output for simpler post-processing of output.
  29. Optionally output error lines indicating the failing test source and log
  30. for direct jump with MSVC or Emacs.
  31. */
  32. /*
  33. * TODO:
  34. * - do not test PEAR components if base class and/or component class cannot be instanciated
  35. */
  36. $cwd = getcwd();
  37. set_time_limit(0);
  38. ob_implicit_flush();
  39. error_reporting(E_ALL);
  40. if (ini_get('safe_mode')) {
  41. echo <<< SAFE_MODE_WARNING
  42. +-----------------------------------------------------------+
  43. | ! WARNING ! |
  44. | You are running the test-suite with "safe_mode" ENABLED ! |
  45. | |
  46. | Chances are high that no test will work at all, |
  47. | depending on how you configured "safe_mode" ! |
  48. +-----------------------------------------------------------+
  49. SAFE_MODE_WARNING;
  50. }
  51. // Don't ever guess at the PHP executable location.
  52. // Require the explicit specification.
  53. // Otherwise we could end up testing the wrong file!
  54. if (getenv('TEST_PHP_EXECUTABLE')) {
  55. $php = getenv('TEST_PHP_EXECUTABLE');
  56. } else {
  57. error("environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!");
  58. }
  59. if (getenv('TEST_PHP_LOG_FORMAT')) {
  60. $log_format = strtoupper(getenv('TEST_PHP_LOG_FORMAT'));
  61. } else {
  62. $log_format = 'LEOD';
  63. }
  64. if (function_exists('is_executable') && !@is_executable($php)) {
  65. error("invalid PHP executable specified by TEST_PHP_EXECUTABLE = " . $php);
  66. }
  67. // Check whether a detailed log is wanted.
  68. if (getenv('TEST_PHP_DETAILED')) {
  69. define('DETAILED', getenv('TEST_PHP_DETAILED'));
  70. } else {
  71. define('DETAILED', 0);
  72. }
  73. // Check whether user test dirs are requested.
  74. if (getenv('TEST_PHP_USER')) {
  75. $user_tests = explode (',', getenv('TEST_PHP_USER'));
  76. } else {
  77. $user_tests = array();
  78. }
  79. // Write test context information.
  80. echo "
  81. =====================================================================
  82. CWD : $cwd
  83. PHP : $php
  84. PHP_SAPI : " . PHP_SAPI . "
  85. PHP_VERSION : " . PHP_VERSION . "
  86. PHP_OS : " . PHP_OS . "
  87. INI actual : " . realpath(get_cfg_var('cfg_file_path')) . "
  88. More .INIs : " . str_replace("\n","", php_ini_scanned_files()) . "
  89. Extra dirs : ";
  90. foreach ($user_tests as $test_dir) {
  91. echo "{$test_dir}\n ";
  92. }
  93. echo "
  94. =====================================================================
  95. ";
  96. // Determine the tests to be run.
  97. $test_to_run = array();
  98. $test_files = array();
  99. $test_results = array();
  100. $GLOBALS['__PHP_FAILED_TESTS__'] = array();
  101. // If parameters given assume they represent selected tests to run.
  102. if (isset($argc) && $argc > 1) {
  103. for ($i=1; $i<$argc; $i++) {
  104. $testfile = realpath($argv[$i]);
  105. $test_to_run[$testfile] = 1;
  106. }
  107. // Run selected tests.
  108. if (count($test_to_run)) {
  109. echo "Running selected tests.\n";
  110. foreach($test_to_run AS $name=>$runnable) {
  111. if(!preg_match("/\.phpt$/", $name))
  112. continue;
  113. if ($runnable) {
  114. $test_results[$name] = run_test($php,$name);
  115. }
  116. }
  117. exit(0);
  118. }
  119. }
  120. // Compile a list of all test files (*.phpt).
  121. $test_files = array();
  122. $exts_to_test = get_loaded_extensions();
  123. $exts_tested = count($exts_to_test);
  124. $exts_skipped = 0;
  125. $ignored_by_ext = 0;
  126. sort($exts_to_test);
  127. $test_dirs = array('tests', 'pear', 'ext');
  128. foreach ($test_dirs as $dir) {
  129. find_files("{$cwd}/{$dir}", ($dir == 'ext'));
  130. }
  131. foreach ($user_tests as $dir) {
  132. find_files("{$dir}", ($dir == 'ext'));
  133. }
  134. function find_files($dir,$is_ext_dir=FALSE,$ignore=FALSE)
  135. {
  136. global $test_files, $exts_to_test, $ignored_by_ext, $exts_skipped, $exts_tested;
  137. $o = opendir($dir) or error("cannot open directory: $dir");
  138. while (($name = readdir($o)) !== FALSE) {
  139. if (is_dir("{$dir}/{$name}") && !in_array($name, array('.', '..', 'CVS'))) {
  140. $skip_ext = ($is_ext_dir && !in_array($name, $exts_to_test));
  141. if ($skip_ext) {
  142. $exts_skipped++;
  143. }
  144. find_files("{$dir}/{$name}", FALSE, $ignore || $skip_ext);
  145. }
  146. // Cleanup any left-over tmp files from last run.
  147. if (substr($name, -4) == '.tmp') {
  148. @unlink("$dir/$name");
  149. continue;
  150. }
  151. // Otherwise we're only interested in *.phpt files.
  152. if (substr($name, -5) == '.phpt') {
  153. if ($ignore) {
  154. $ignored_by_ext++;
  155. } else {
  156. $testfile = realpath("{$dir}/{$name}");
  157. $test_files[] = $testfile;
  158. }
  159. }
  160. }
  161. closedir($o);
  162. }
  163. sort($test_files);
  164. $start_time = time();
  165. echo "TIME START " . date('Y-m-d H:i:s', $start_time) . "
  166. =====================================================================
  167. ";
  168. foreach ($test_files as $name) {
  169. $test_results[$name] = run_test($php,$name);
  170. }
  171. $end_time = time();
  172. // Summarize results
  173. if (0 == count($test_results)) {
  174. echo "No tests were run.\n";
  175. return;
  176. }
  177. $n_total = count($test_results);
  178. $n_total += $ignored_by_ext;
  179. $sum_results = array('PASSED'=>0, 'SKIPPED'=>0, 'FAILED'=>0);
  180. foreach ($test_results as $v) {
  181. $sum_results[$v]++;
  182. }
  183. $sum_results['SKIPPED'] += $ignored_by_ext;
  184. $percent_results = array();
  185. while (list($v,$n) = each($sum_results)) {
  186. $percent_results[$v] = (100.0 * $n) / $n_total;
  187. }
  188. echo "
  189. =====================================================================
  190. TIME END " . date('Y-m-d H:i:s', $end_time) . "
  191. =====================================================================
  192. TEST RESULT SUMMARY
  193. ---------------------------------------------------------------------
  194. Exts skipped : " . sprintf("%4d",$exts_skipped) . "
  195. Exts tested : " . sprintf("%4d",$exts_tested) . "
  196. ---------------------------------------------------------------------
  197. Number of tests : " . sprintf("%4d",$n_total) . "
  198. Tests skipped : " . sprintf("%4d (%2.1f%%)",$sum_results['SKIPPED'],$percent_results['SKIPPED']) . "
  199. Tests failed : " . sprintf("%4d (%2.1f%%)",$sum_results['FAILED'],$percent_results['FAILED']) . "
  200. Tests passed : " . sprintf("%4d (%2.1f%%)",$sum_results['PASSED'],$percent_results['PASSED']) . "
  201. ---------------------------------------------------------------------
  202. Time taken : " . sprintf("%4d seconds", $end_time - $start_time) . "
  203. =====================================================================
  204. ";
  205. define('PHP_QA_EMAIL', 'php-qa@lists.php.net');
  206. define('QA_SUBMISSION_PAGE', 'http://qa.php.net/buildtest-process.php');
  207. /* We got failed Tests, offer the user to send and e-mail to QA team */
  208. if ($sum_results['FAILED']) {
  209. $fp = fopen("php://stdin", "r+");
  210. fwrite($fp, "Some tests have failed, would you like to send the\nreport to PHP's QA team? [Yn]: ");
  211. fflush($fp);
  212. $user_input = fgets($fp, 10);
  213. if (strlen(trim($user_input)) == 0 || strtolower($user_input[0]) == 'y') {
  214. /*
  215. * Collect information about the host system for our report
  216. * Fetch phpinfo() output so that we can see the PHP enviroment
  217. * Make an archive of all the failed tests
  218. * Send an email
  219. */
  220. $failed_tests_data = '';
  221. $sep = "\n" . str_repeat('=', 80) . "\n";
  222. $failed_tests_data .= "Automake:\n". shell_exec('automake --version'). "\n";
  223. $failed_tests_data .= "Autoconf:\n". shell_exec('autoconf --version'). "\n";
  224. $failed_tests_data .= "Libtool:\n". shell_exec('libtool --version'). "\n";
  225. $failed_tests_data .= "Bison:\n". shell_exec('bison --version'). "\n";
  226. $failed_tests_data .= "Compiler:\n". shell_exec('cc --version'). "\n";
  227. $failed_tests_data .= "\n\n";
  228. foreach ($GLOBALS['__PHP_FAILED_TESTS__'] as $test_info) {
  229. $failed_tests_data .= $sep . $test_info['name'];
  230. $failed_tests_data .= $sep . file_get_contents(realpath($test_info['output']));
  231. $failed_tests_data .= $sep . file_get_contents(realpath($test_info['diff']));
  232. $failed_tests_data .= $sep . "\n\n";
  233. }
  234. $failed_tests_data .= $sep . "PHPINFO" . $sep;
  235. $failed_tests_data .= shell_exec($php.' -i');
  236. $compression = 0;
  237. if (!mail_qa_team($failed_tests_data, $compression)) {
  238. $output_file = 'php_test_results_' . date('Ymd') . ( $compression ? '.txt.gz' : '.txt' );
  239. $fp = fopen($output_file, "w");
  240. fwrite($fp, $failed_tests_data);
  241. fclose($fp);
  242. echo "\nThe test script was unable to automatically send the report to PHP's QA Team\nPlease send ".$output_file." to ".PHP_QA_EMAIL." manually, thank you.\n";
  243. } else {
  244. fwrite($fp, "\nThank you for helping to make PHP better.\n");
  245. fclose($fp);
  246. }
  247. }
  248. }
  249. //
  250. // Send Email to QA Team
  251. //
  252. function mail_qa_team($data, $compression)
  253. {
  254. $url_bits = parse_url(QA_SUBMISSION_PAGE);
  255. if (empty($url_bits['port'])) $url_bits['port'] = 80;
  256. $data = "php_test_data=" . urlencode(base64_encode(preg_replace("/[\\x00]/", "[0x0]", $data)));
  257. $data_length = strlen($data);
  258. $fs = fsockopen($url_bits['host'], $url_bits['port'], $errno, $errstr, 10);
  259. if (!$fs) {
  260. return FALSE;
  261. }
  262. echo "Posting to {$url_bits['host']} {$url_bits['path']}\n";
  263. fwrite($fs, "POST ".$url_bits['path']." HTTP/1.1\r\n");
  264. fwrite($fs, "Host: ".$url_bits['host']."\r\n");
  265. fwrite($fs, "User-Agent: QA Browser 0.1\r\n");
  266. fwrite($fs, "Content-Type: application/x-www-form-urlencoded\r\n");
  267. fwrite($fs, "Content-Length: ".$data_length."\r\n\r\n");
  268. fwrite($fs, $data);
  269. fwrite($fs, "\r\n\r\n");
  270. fclose($fs);
  271. return 1;
  272. }
  273. //
  274. // Write the given text to a temporary file, and return the filename.
  275. //
  276. function save_text($filename,$text)
  277. {
  278. $fp = @fopen($filename,'w') or error("Cannot open file '" . $filename . "' (save_text)");
  279. fwrite($fp,$text);
  280. fclose($fp);
  281. if (1 < DETAILED) echo "
  282. FILE $filename {{{
  283. $text
  284. }}}
  285. ";
  286. }
  287. //
  288. // Write an error in a format recognizable to Emacs or MSVC.
  289. //
  290. function error_report($testname,$logname,$tested)
  291. {
  292. $testname = realpath($testname);
  293. $logname = realpath($logname);
  294. switch (strtoupper(getenv('TEST_PHP_ERROR_STYLE'))) {
  295. case 'MSVC':
  296. echo $testname . "(1) : $tested\n";
  297. echo $logname . "(1) : $tested\n";
  298. break;
  299. case 'EMACS':
  300. echo $testname . ":1: $tested\n";
  301. echo $logname . ":1: $tested\n";
  302. break;
  303. }
  304. }
  305. //
  306. // Run an individual test case.
  307. //
  308. function run_test($php,$file)
  309. {
  310. global $log_format;
  311. if (DETAILED) echo "
  312. =================
  313. TEST $file
  314. ";
  315. // Load the sections of the test file.
  316. $section_text = array(
  317. 'TEST' => '(unnamed test)',
  318. 'SKIPIF' => '',
  319. 'GET' => '',
  320. 'ARGS' => '',
  321. );
  322. $fp = @fopen($file, "r") or error("Cannot open test file: $file");
  323. $section = '';
  324. while (!feof($fp)) {
  325. $line = fgets($fp);
  326. // Match the beginning of a section.
  327. if (ereg('^--([A-Z]+)--',$line,$r)) {
  328. $section = $r[1];
  329. $section_text[$section] = '';
  330. continue;
  331. }
  332. // Add to the section text.
  333. $section_text[$section] .= $line;
  334. }
  335. fclose($fp);
  336. $shortname = str_replace($GLOBALS['cwd'].'/', '', $file);
  337. $tested = trim($section_text['TEST'])." [$shortname]";
  338. $tmp = realpath(dirname($file));
  339. $tmp_skipif = $tmp . uniqid('/phpt.');
  340. $tmp_file = $tmp . uniqid('/phpt.');
  341. $tmp_post = $tmp . uniqid('/phpt.');
  342. @unlink($tmp_skipif);
  343. @unlink($tmp_file);
  344. @unlink($tmp_post);
  345. // Reset environment from any previous test.
  346. putenv("REDIRECT_STATUS=");
  347. putenv("QUERY_STRING=");
  348. putenv("PATH_TRANSLATED=");
  349. putenv("SCRIPT_FILENAME=");
  350. putenv("REQUEST_METHOD=");
  351. putenv("CONTENT_TYPE=");
  352. putenv("CONTENT_LENGTH=");
  353. // unlink old test results
  354. @unlink(ereg_replace('\.phpt$','.diff',$file));
  355. @unlink(ereg_replace('\.phpt$','.log',$file));
  356. @unlink(ereg_replace('\.phpt$','.exp',$file));
  357. @unlink(ereg_replace('\.phpt$','.out',$file));
  358. // Check if test should be skipped.
  359. if (array_key_exists('SKIPIF', $section_text)) {
  360. if (trim($section_text['SKIPIF'])) {
  361. save_text($tmp_skipif, $section_text['SKIPIF']);
  362. $output = `$php $tmp_skipif`;
  363. @unlink($tmp_skipif);
  364. if (ereg("^skip", trim($output))){
  365. echo "SKIP $tested";
  366. $reason = (ereg("^skip[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE;
  367. if ($reason) {
  368. echo " (reason: $reason)\n";
  369. } else {
  370. echo "\n";
  371. }
  372. return 'SKIPPED';
  373. }
  374. }
  375. }
  376. // Default ini settings
  377. $settings = array (
  378. "-d 'open_basedir='",
  379. "-d 'disable_functions='",
  380. "-d 'error_reporting=2047'",
  381. "-d 'display_errors=1'",
  382. "-d 'html_errors=0'",
  383. "-d 'docref_root=/phpmanual/'",
  384. "-d 'docref_ext=.html'",
  385. "-d 'error_prepend_string='",
  386. "-d 'error_append_string='",
  387. "-d 'auto_append_file='",
  388. "-d 'auto_prepend_file='",
  389. );
  390. $ini_settings = ' '. join (' ', $settings);
  391. // Any special ini settings
  392. if (array_key_exists('INI', $section_text)) {
  393. foreach(preg_split( "/[\n\r]+/", $section_text['INI']) as $setting) {
  394. if (strlen($setting)) {
  395. $ini_settings .= " -d '$setting'";
  396. }
  397. }
  398. }
  399. // We've satisfied the preconditions - run the test!
  400. save_text($tmp_file,$section_text['FILE']);
  401. if (array_key_exists('GET', $section_text)) {
  402. $query_string = trim($section_text['GET']);
  403. } else {
  404. $query_string = '';
  405. }
  406. putenv("REDIRECT_STATUS=1");
  407. putenv("QUERY_STRING=$query_string");
  408. putenv("PATH_TRANSLATED=$tmp_file");
  409. putenv("SCRIPT_FILENAME=$tmp_file");
  410. $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : '';
  411. if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) {
  412. $post = trim($section_text['POST']);
  413. save_text($tmp_post,$post);
  414. $content_length = strlen($post);
  415. putenv("REQUEST_METHOD=POST");
  416. putenv("CONTENT_TYPE=application/x-www-form-urlencoded");
  417. putenv("CONTENT_LENGTH=$content_length");
  418. $cmd = "$php$ini_settings -f $tmp_file 2>&1 < $tmp_post";
  419. } else {
  420. putenv("REQUEST_METHOD=GET");
  421. putenv("CONTENT_TYPE=");
  422. putenv("CONTENT_LENGTH=");
  423. $cmd = "$php$ini_settings -f $tmp_file$args 2>&1";
  424. }
  425. if (DETAILED) echo "
  426. CONTENT_LENGTH = " . getenv("CONTENT_LENGTH") . "
  427. CONTENT_TYPE = " . getenv("CONTENT_TYPE") . "
  428. PATH_TRANSLATED = " . getenv("PATH_TRANSLATED") . "
  429. QUERY_STRING = " . getenv("QUERY_STRING") . "
  430. REDIRECT_STATUS = " . getenv("REDIRECT_STATUS") . "
  431. REQUEST_METHOD = " . getenv("REQUEST_METHOD") . "
  432. SCRIPT_FILENAME = " . getenv("SCRIPT_FILENAME") . "
  433. COMMAND $cmd
  434. ";
  435. $out = `$cmd`;
  436. @unlink($tmp_post);
  437. @unlink($tmp_file);
  438. // Does the output match what is expected?
  439. $output = trim($out);
  440. $output = preg_replace('/\r\n/',"\n",$output);
  441. if (isset($section_text['EXPECTF'])) {
  442. $wanted = trim($section_text['EXPECTF']);
  443. $wanted_re = preg_replace('/\r\n/',"\n",$wanted);
  444. $wanted_re = preg_quote($wanted_re, '/');
  445. // Stick to basics
  446. $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy
  447. $wanted_re = str_replace("%i", "[0-9]+", $wanted_re);
  448. $wanted_re = str_replace("%d", "[0-9]+", $wanted_re);
  449. $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re);
  450. $wanted_re = str_replace("%f", "[0-9\.+\-]+", $wanted_re);
  451. /* DEBUG YOUR REGEX HERE
  452. var_dump($wanted);
  453. print(str_repeat('=', 80) . "\n");
  454. var_dump($output);
  455. */
  456. if (preg_match("/^$wanted_re\$/s", $output)) {
  457. echo "PASS $tested\n";
  458. return 'PASSED';
  459. }
  460. } else {
  461. $wanted = trim($section_text['EXPECT']);
  462. $wanted = preg_replace('/\r\n/',"\n",$wanted);
  463. // compare and leave on success
  464. $ok = (0 == strcmp($output,$wanted));
  465. if ($ok) {
  466. echo "PASS $tested\n";
  467. return 'PASSED';
  468. }
  469. }
  470. // Test failed so we need to report details.
  471. echo "FAIL $tested\n";
  472. $GLOBALS['__PHP_FAILED_TESTS__'][] = array(
  473. 'name' => $file,
  474. 'output' => ereg_replace('\.phpt$','.log', $file),
  475. 'diff' => ereg_replace('\.phpt$','.diff', $file)
  476. );
  477. // write .exp
  478. if (strpos($log_format,'E') !== FALSE) {
  479. $logname = ereg_replace('\.phpt$','.exp',$file);
  480. $log = fopen($logname,'w') or error("Cannot create test log - $logname");
  481. fwrite($log,$wanted);
  482. fclose($log);
  483. }
  484. // write .out
  485. if (strpos($log_format,'O') !== FALSE) {
  486. $logname = ereg_replace('\.phpt$','.out',$file);
  487. $log = fopen($logname,'w') or error("Cannot create test log - $logname");
  488. fwrite($log,$output);
  489. fclose($log);
  490. }
  491. // write .diff
  492. if (strpos($log_format,'D') !== FALSE) {
  493. $logname = ereg_replace('\.phpt$','.diff',$file);
  494. $log = fopen($logname,'w') or error("Cannot create test log - $logname");
  495. fwrite($log,generate_diff($wanted,$output));
  496. fclose($log);
  497. }
  498. // write .log
  499. if (strpos($log_format,'L') !== FALSE) {
  500. $logname = ereg_replace('\.phpt$','.log',$file);
  501. $log = fopen($logname,'w') or error("Cannot create test log - $logname");
  502. fwrite($log,"
  503. ---- EXPECTED OUTPUT
  504. $wanted
  505. ---- ACTUAL OUTPUT
  506. $output
  507. ---- FAILED
  508. ");
  509. fclose($log);
  510. error_report($file,$logname,$tested);
  511. }
  512. return 'FAILED';
  513. }
  514. function generate_diff($wanted,$output)
  515. {
  516. $w = explode("\n", $wanted);
  517. $o = explode("\n", $output);
  518. $w1 = array_diff($w,$o);
  519. $o1 = array_diff($o,$w);
  520. $w2 = array();
  521. $o2 = array();
  522. foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val;
  523. foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val;
  524. $diff = array_merge($w2, $o2);
  525. ksort($diff);
  526. return implode("\r\n", $diff);
  527. }
  528. function error($message)
  529. {
  530. echo "ERROR: {$message}\n";
  531. exit(1);
  532. }
  533. /*
  534. * Local variables:
  535. * tab-width: 4
  536. * c-basic-offset: 4
  537. * End:
  538. * vim600: fdm=marker
  539. * vim: noet sw=4 ts=4
  540. */
  541. ?>