diff --git a/run-tests.php b/run-tests.php index 89bd8ffb797c..89b5882f6674 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2920,19 +2920,27 @@ function run_test(string $php, $file, array $env): string {$exported_environment} case "$1" in "gdb") - gdb -ex 'unset environment LINES' -ex 'unset environment COLUMNS' --args {$orig_cmd} + shift + exec gdb -ex 'unset environment LINES' -ex 'unset environment COLUMNS' "$@" --args {$orig_cmd} ;; "lldb") - lldb -- {$orig_cmd} + shift + exec lldb "$@" -- {$orig_cmd} ;; "valgrind") - USE_ZEND_ALLOC=0 valgrind $2 {$orig_cmd} + export USE_ZEND_ALLOC=0 + shift + exec valgrind "$@" {$orig_cmd} + ;; +"strace") + shift + exec strace "$@" {$orig_cmd} ;; "rr") - rr record $2 {$orig_cmd} + exec rr record $2 {$orig_cmd} ;; *) - {$orig_cmd} + exec {$orig_cmd} ;; esac SH;