aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2017-02-07 22:31:46 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2017-02-16 13:06:12 +0000
commit2bd7f877afeadd6da4c6b1dfc4d0489e9c0efb55 (patch)
treeac58e3f02b1f9cbc4391d521e880efc14a3b3596 /ld/testsuite/ld-plugin
parent37d7d56caea508e836bc0d4f0fef0cb520f3ba22 (diff)
ld: Add additional checking for warnings/errors in testsuite
This commit adds new actions to the run_cc_link_tests mechanism in the linker testsuite. Previously this procedure could take a parameter containing a regular expression that would be matched against warnings from the linker. After this commit the warnings parameter is removed, instead, the actions list can contain the actions 'warning', 'error', 'warning_output', or 'error_output'. The action names are chosen to match the actions already present in the run_dump_test procedure. These new actions allow for the current warning checking, but also allow for checking of errors using a regular expression. More interestingly, the *_output actions allow for the warning/error patterns to be placed in a separate file. The small number of tests that make use of the warning parameter have been updated to the new mechanism. Later commits will make use of the new features added in this commit. ld/ChangeLog: * testsuite/lib/ld-lib.exp (run_cc_link_tests): Add warning, error, warning_output, and error_output actions. Remove separate warnings parameter. * testsuite/ld-elf/shared.exp (build_tests): Updated to use 'warning' action. * testsuite/ld-plugin/lto.exp (lto_link_tests): Likewise.
Diffstat (limited to 'ld/testsuite/ld-plugin')
-rw-r--r--ld/testsuite/ld-plugin/lto.exp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index c738895821..80c084bda1 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -154,7 +154,8 @@ set lto_link_tests [list \
{pr12760b.c} {} "libpr12760.a"] \
[list "PR ld/12760" \
"-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12760a.o -Wl,--start-group tmpdir/libpr12760.a -Wl,--end-group" "" \
- {dummy.c} {} "pr12760.exe" "c" "pr12760a.c:6: warning: Bad \\.?bar"] \
+ {dummy.c} {{warning "pr12760a.c:6: warning: Bad \\.?bar"}} \
+ "pr12760.exe" "c"] \
[list "Build libpr13183.a" \
"-T" "-flto -O2 $lto_fat" \
{pr13183a.c} {} "libpr13183.a"] \
@@ -205,7 +206,8 @@ set lto_link_tests [list \
{pr20267b.c} {} "libpr20267b.a"] \
[list "Build pr20321" \
"-flto -Wl,-plugin,$plug_so" "-flto" \
- {pr20321.c} {} "pr20321" "c" ".*: duplicated plugin"] \
+ {pr20321.c} {{warning ".*: duplicated plugin"}} \
+ "pr20321" "c"] \
]
if { [at_least_gcc_version 4 7] } {