]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[testsuite] Make the testsuite work on mingw
authorChristian Biesinger <cbiesinger@google.com>
Wed, 14 Aug 2019 23:13:04 +0000 (18:13 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Thu, 15 Aug 2019 16:14:35 +0000 (11:14 -0500)
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:/.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index 6c80a69e065fc69d80786771718137c3a4f0c8c9..12491151c54d06864dca62430c330d41a8252a1c 100644 (file)
@@ -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.
index edc8dfcdfde80a547f34b74b781311701e1ecb29..af56e8aa128e669c6d425c8a324d1cdfd77b8ec6 100644 (file)
@@ -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]
 }