]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Find and run some tests using a wildcard pattern
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 27 Apr 2017 16:53:28 +0000 (17:53 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 11 Jan 2018 17:35:34 +0000 (17:35 +0000)
Find the ld-script/provide-*.d tests using a wildcard, then run them in
a loop.  This will make it easier to add more tests in the future.  Some
associated clean up is required.

ld/ChangeLog:

* testsuite/ld-scripts/provide-3.d: Add xfail directive.
* testsuite/ld-scripts/provide-4.d: Use new map file name.
* testsuite/ld-scripts/provide-5.d: Use new map file name.
* testsuite/ld-scripts/provide-4-map.d: Renamed to...
* testsuite/ld-scripts/provide-4.map: ...this.
* testsuite/ld-scripts/provide-5-map.d: Renamed to...
* testsuite/ld-scripts/provide-5.map: ...this.
* testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
file, and run tests in a loop.

ld/ChangeLog
ld/testsuite/ld-scripts/provide-3.d
ld/testsuite/ld-scripts/provide-4.d
ld/testsuite/ld-scripts/provide-4.map [moved from ld/testsuite/ld-scripts/provide-4-map.d with 100% similarity]
ld/testsuite/ld-scripts/provide-5.d
ld/testsuite/ld-scripts/provide-5.map [moved from ld/testsuite/ld-scripts/provide-5-map.d with 100% similarity]
ld/testsuite/ld-scripts/provide.exp

index 1357b89175b8f94cbcbabda969b20351c3596a06..f96517e68fcc74209e9ea8aabb7a5048aa57eb08 100644 (file)
@@ -1,3 +1,15 @@
+2018-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * testsuite/ld-scripts/provide-3.d: Add xfail directive.
+       * testsuite/ld-scripts/provide-4.d: Use new map file name.
+       * testsuite/ld-scripts/provide-5.d: Use new map file name.
+       * testsuite/ld-scripts/provide-4-map.d: Renamed to...
+       * testsuite/ld-scripts/provide-4.map: ...this.
+       * testsuite/ld-scripts/provide-5-map.d: Renamed to...
+       * testsuite/ld-scripts/provide-5.map: ...this.
+       * testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
+       file, and run tests in a loop.
+
 2018-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * ldexp.c (exp_print_tree): Use '=' instead of ',' when printing
index c8b12dafe7f5ec1b8c86c132b252f14e019e440e..a5855e6b4733752042fb982d680e769f55f26cb0 100644 (file)
@@ -1,3 +1,4 @@
 #source: provide-3.s
 #ld: -T provide-3.t
 #error: symbol defined in linker script and object file
+#xfail: "*-*-*"
index a7d37e3c347baff85631e80a50311e3f59d155c0..18699f221dab709cde541946e21de467c50a3b92 100644 (file)
@@ -1,7 +1,7 @@
 #source: provide-2.s
 #ld: -T provide-4.t
 #PROG: nm
-#map: provide-4-map.d
+#map: provide-4.map
 #...
 0+3 A baz
 0+2000 D foo
index 1b14fa6a2fe29b7520e9e0a2628f8a2a687d5d27..2a8baec605bb0b638d5b6e8ce3f1ab41af86b6b0 100644 (file)
@@ -1,6 +1,6 @@
 #source: provide-5.s
 #ld: -T provide-5.t
 #PROG: nm
-#map: provide-5-map.d
+#map: provide-5.map
 #...
 0+10 A foo
index 3a0b2e8070f90e3fdf0efdb79067cf898c716527..01bf934d17e511d47ce929d6e5cdd6136dcee8ca 100644 (file)
@@ -36,11 +36,11 @@ if [istarget "x86_64-*-mingw*"] then {
   set LDFLAGS "$LDFLAGS --image-base 0"
 }
 
-run_dump_test provide-1
-run_dump_test provide-2
-setup_xfail *-*-*
-run_dump_test provide-3
-run_dump_test provide-4
-run_dump_test provide-5
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/provide-*.d]]
+foreach test_file $test_list {
+    set test_name [file rootname $test_file]
+    verbose $test_name
+    run_dump_test $test_name
+}
 
 set LDFLAGS "$saved_LDFLAGS"