]> granicus.if.org Git - php/commitdiff
Using new magic constant __DIR__ in run-tests.php
authorLars Strojny <lstrojny@php.net>
Wed, 5 Mar 2008 20:10:12 +0000 (20:10 +0000)
committerLars Strojny <lstrojny@php.net>
Wed, 5 Mar 2008 20:10:12 +0000 (20:10 +0000)
run-tests.php

index 3f96c0107f4dd62b14b632d669a84a9b80552b9e..9490406913122bc904dbf86997e73755ed4313a5 100755 (executable)
@@ -198,7 +198,7 @@ function write_information($show_html)
        global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test, $leak_check, $valgrind_header;
 
        // Get info from php
-       $info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
+       $info_file = __DIR__ . '/run-test-info.php';
        @unlink($info_file);
        $php_info = '<?php echo "
 PHP_SAPI    : " . PHP_SAPI . "
@@ -777,7 +777,7 @@ if ($just_save_results || !getenv('NO_INTERACTION')) {
                        $libtool = shell_exec($CUR_DIR . '/libtool --version');
 
                        /* Use shtool to find out if there is glibtool present (MacOSX) */
-                       $sys_libtool_path = shell_exec(dirname(__FILE__) . '/build/shtool path glibtool libtool');
+                       $sys_libtool_path = shell_exec(__DIR__ . '/build/shtool path glibtool libtool');
                        if ($sys_libtool_path) {
                                $sys_libtool = shell_exec(str_replace("\n", "", $sys_libtool_path) . ' --version');
                        }
@@ -1183,7 +1183,7 @@ TEST $file
        $temp_clean        = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php';
        $test_clean        = $test_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php';
        $tmp_post          = $temp_dir . DIRECTORY_SEPARATOR . uniqid('/phpt.');
-       $tmp_relative_file = str_replace(dirname(__FILE__).DIRECTORY_SEPARATOR, '', $test_file) . 't';
+       $tmp_relative_file = str_replace(__DIR__ . DIRECTORY_SEPARATOR, '', $test_file) . 't';
 
        if ($temp_source && $temp_target) {
                $temp_skipif  .= 's';