summaryrefslogtreecommitdiffstats
path: root/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
diff options
context:
space:
mode:
Diffstat (limited to 'cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl')
-rwxr-xr-xcross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl14
1 files changed, 10 insertions, 4 deletions
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl b/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
index 6dbc3b9b8632..fa52a5037c21 100755
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ b/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -56,7 +56,7 @@ my $my_debugger = $ENV{'DEBUGGER'};
if (!$my_debugger) {
if ($use_lldb) {
my $path = dirname(Cwd::abs_path($0));
- $my_debugger = "/usr/bin/env python3 $path/llgdb.py";
+ $my_debugger = "/usr/bin/xcrun python3 $path/llgdb.py";
} else {
$my_debugger = "gdb";
}
@@ -66,12 +66,18 @@ if (!$my_debugger) {
my $debugger_options = "-q -batch -n -x";
# run debugger and capture output.
+print("Running debugger\n");
system("$my_debugger $debugger_options $debugger_script_file $executable_file > $output_file 2>&1");
-
+if ($?) {
+ print("Debugger output was:\n");
+ system("cat", "$output_file");
+ exit 1;
+}
# validate output.
+print("Running FileCheck\n");
system("FileCheck", "-input-file", "$output_file", "$testcase_file");
-if ($?>>8 == 1) {
- print "Debugger output was:\n";
+if ($?) {
+ print("Debugger output was:\n");
system("cat", "$output_file");
exit 1;
}