aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-08-14 18:13:04 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-08-15 11:14:35 -0500
commit97dd8e07d998f5f0fcd0d06fd53e2ae9d337d222 (patch)
tree0af01eb3fea1c8f50bdc64d294151e6966b4a7ad
parent6ae978f133a67d34d01b6bb2053f1ba20ad13eeb (diff)
downloadbinutils-97dd8e07d998f5f0fcd0d06fd53e2ae9d337d222.zip
binutils-97dd8e07d998f5f0fcd0d06fd53e2ae9d337d222.tar.gz
binutils-97dd8e07d998f5f0fcd0d06fd53e2ae9d337d222.tar.bz2
[testsuite] Make the testsuite work on mingw
Dejagnu produces an objdir like /c/, but GDB expects something like c:/. So fix it up in lib/gdb.exp. gdb/testsuite/ChangeLog: 2019-08-14 Christian Biesinger <cbiesinger@google.com> * lib/gdb.exp: When running on a mingw target, replace /x/ with x:/.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp4
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6c80a69..1249115 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-15 Christian Biesinger <cbiesinger@google.com>
+
+ * lib/gdb.exp: When running on a mingw target, replace
+ /x/ with x:/.
+
2019-08-14 Alan Hayward <alan.hayward@arm.com>
* gdb.arch/aarch64-prologue.c: New test.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index edc8dfc..af56e8a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4724,6 +4724,10 @@ proc standard_output_file {basename} {
set dir [make_gdb_parallel_path outputs $subdir $gdb_test_file_name]
file mkdir $dir
+ # If running on MinGW, replace /c/foo with c:/foo
+ if { [ishost *-*-mingw*] } {
+ set dir [regsub {^/([a-z])/} $dir {\1:/}]
+ }
return [file join $dir $basename]
}