ld/testsuite: adjust to Windows path separator.
authorClément Chigot <chigot@adacore.com>
Thu, 12 Jan 2023 10:02:25 +0000 (11:02 +0100)
committerClément Chigot <chigot@adacore.com>
Mon, 20 Feb 2023 14:23:56 +0000 (15:23 +0100)
In some tests, the path reported on Windows will have a \ instead of a
/. This occurs when a file is concatened with the search path in
ldfile.c.:  "ld -Ltmpdir -ltext" will result into "tmpdir\libtext.a".

ld/ChangeLog:

* testsuite/ld-elf/retain5.map: Allow \ path separator.
* testsuite/ld-plugin/plugin-10.d: Likewise.
* testsuite/ld-plugin/plugin-11.d: Likewise.
* testsuite/ld-plugin/plugin-18.d: Likewise.
* testsuite/ld-plugin/plugin-19.d: Likewise.
* testsuite/ld-plugin/plugin-20.d: Likewise.
* testsuite/ld-plugin/plugin-22.d: Likewise.

ld/testsuite/ld-elf/retain5.map
ld/testsuite/ld-plugin/plugin-10.d
ld/testsuite/ld-plugin/plugin-11.d
ld/testsuite/ld-plugin/plugin-18.d
ld/testsuite/ld-plugin/plugin-19.d
ld/testsuite/ld-plugin/plugin-20.d
ld/testsuite/ld-plugin/plugin-22.d

index 6b97c2a2206bedf16b53fdcc8c015779543ecf2c..0e919113f7254f663c3a7d9acce0e4f58f553be3 100644 (file)
@@ -1,5 +1,5 @@
 # Check that the library was actually loaded to catch any false PASS.
 
 #...
-LOAD tmpdir/libretain5.a
+LOAD tmpdir[/\\]libretain5.a
 #pass
index 3818bf7bb2fa935d7dc6a2237bfa12548ea5c445..f92ee650c134eac0214087e946f76293adb76cd2 100644 (file)
@@ -29,7 +29,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* not claimed
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* not claimed
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
index 10b80288606a52b940f07b8eb7662c8b2410b91d..6a5abcfc060a2cf201ad2414ec9485f0f5251b38 100644 (file)
@@ -32,7 +32,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* CLAIMED
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
index 0200a05cfd603f85a5bec48d51937fd4362193ea..284fd057686b256c624230a4aa4fb925ee92fbaf 100644 (file)
@@ -29,7 +29,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* not claimed
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* not claimed
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
index e838028fd36cad644aeb1fef1c1d12a562b39860..621ee7689f0c177b44d1c37254251802df16ff99 100644 (file)
@@ -32,7 +32,7 @@ Hello from testplugin.
 hook called: claim_file tmpdir/main.o \[@0/.* not claimed
 hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
 #...
-hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
+hook called: claim_file tmpdir[/\\]libtext.a \[@.* CLAIMED
 #...
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
index 31bc376616287d6fd1cad6a4e3f6b5c29529672a..e3c724df6369e768303dd86b544cb46710cca34a 100644 (file)
@@ -1,5 +1,5 @@
 hook called: all symbols read.
-Input: func.c \(tmpdir/libfunc.a\)
+Input: func.c \(tmpdir[/\\]libfunc.a\)
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 .*: tmpdir/main.o: in function `main':
index 1084a0b00cf4ff46b339681ecb7abddb8a4582c5..381ac03c05261ae6349435627097326bfbb2e9ac 100644 (file)
@@ -1,4 +1,4 @@
-Claimed: tmpdir/libfunc.a \[@.*
+Claimed: tmpdir[/\\]libfunc.a \[@.*
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*