Skip to content

Commit 12c4ff5

Browse files
committed
Revert run-tests.php changes
1 parent c4a0d57 commit 12c4ff5

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

run-tests.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,6 @@ function run_test(string $php, $file, array $env): string
19341934
$diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'diff';
19351935
$log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'log';
19361936
$exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'exp';
1937-
$stdin_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'stdin';
19381937
$output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'out';
19391938
$memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'mem';
19401939
$sh_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'sh';
@@ -1973,7 +1972,6 @@ function run_test(string $php, $file, array $env): string
19731972
@unlink($diff_filename);
19741973
@unlink($log_filename);
19751974
@unlink($exp_filename);
1976-
@unlink($stdin_filename);
19771975
@unlink($output_filename);
19781976
@unlink($memcheck_filename);
19791977
@unlink($sh_filename);
@@ -2698,16 +2696,6 @@ function run_test(string $php, $file, array $env): string
26982696
$diff = generate_diff($wanted, $wanted_re, $output);
26992697
}
27002698

2701-
// write .stdin
2702-
if ($test->hasSection('STDIN') || $test->hasSection('PHPDBG')) {
2703-
$stdin = $test->hasSection('STDIN')
2704-
? $test->getSection('STDIN')
2705-
: $test->getSection('PHPDBG') . "\n";
2706-
if (file_put_contents($stdin_filename, $stdin) === false) {
2707-
error("Cannot create test stdin - $stdin_filename");
2708-
}
2709-
}
2710-
27112699
if (is_array($IN_REDIRECT)) {
27122700
$orig_shortname = str_replace(TEST_PHP_SRCDIR . '/', '', $file);
27132701
$diff = "# original source file: $orig_shortname\n" . $diff;
@@ -2735,12 +2723,8 @@ function run_test(string $php, $file, array $env): string
27352723
if (!$passed || $leaked) {
27362724
// write .sh
27372725
if (strpos($log_format, 'S') !== false) {
2738-
$env_lines = ['unset $(env | cut -d= -f1)'];
2726+
$env_lines = [];
27392727
foreach ($env as $env_var => $env_val) {
2740-
if (strval($env_val) === '') {
2741-
// proc_open does not pass empty env vars
2742-
continue;
2743-
}
27442728
$env_lines[] = "export $env_var=" . escapeshellarg($env_val ?? "");
27452729
}
27462730
$exported_environment = "\n" . implode("\n", $env_lines) . "\n";
@@ -2749,7 +2733,7 @@ function run_test(string $php, $file, array $env): string
27492733
{$exported_environment}
27502734
case "$1" in
27512735
"gdb")
2752-
gdb -ex 'unset environment LINES' -ex 'unset environment COLUMNS' --args {$orig_cmd}
2736+
gdb --args {$orig_cmd}
27532737
;;
27542738
"lldb")
27552739
lldb -- {$orig_cmd}

0 commit comments

Comments
 (0)