aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/gcov/gcov.exp4
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov.exp4
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp13
3 files changed, 17 insertions, 4 deletions
diff --git a/gcc/testsuite/g++.dg/gcov/gcov.exp b/gcc/testsuite/g++.dg/gcov/gcov.exp
index 04e7a01..def827d 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov.exp
+++ b/gcc/testsuite/g++.dg/gcov/gcov.exp
@@ -24,9 +24,9 @@ global GXX_UNDER_TEST
# Find gcov in the same directory as $GXX_UNDER_TEST.
if { ![is_remote host] && [string match "*/*" [lindex $GXX_UNDER_TEST 0]] } {
- set GCOV [file dirname [lindex $GXX_UNDER_TEST 0]]/[transform gcov]
+ set GCOV [file dirname [lindex $GXX_UNDER_TEST 0]]/[gcc-transform-out-of-tree gcov]
} else {
- set GCOV [transform gcov]
+ set GCOV [gcc-transform-out-of-tree gcov]
}
# Initialize harness.
diff --git a/gcc/testsuite/gcc.misc-tests/gcov.exp b/gcc/testsuite/gcc.misc-tests/gcov.exp
index b8e9661..bc8e2c9 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov.exp
+++ b/gcc/testsuite/gcc.misc-tests/gcov.exp
@@ -24,9 +24,9 @@ global GCC_UNDER_TEST
# For now find gcov in the same directory as $GCC_UNDER_TEST.
if { ![is_remote host] && [string match "*/*" [lindex $GCC_UNDER_TEST 0]] } {
- set GCOV [file dirname [lindex $GCC_UNDER_TEST 0]]/[transform gcov]
+ set GCOV [file dirname [lindex $GCC_UNDER_TEST 0]]/[gcc-transform-out-of-tree gcov]
} else {
- set GCOV [transform gcov]
+ set GCOV [gcc-transform-out-of-tree gcov]
}
# Initialize harness.
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 23ec038..0129b11 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1429,5 +1429,18 @@ proc scan-symbol-not { args } {
}
}
+# Transform a tool-name to its canonical-target-name by "transform"
+# (which may return the original name for native targets) but only if
+# testing out-of-tree. When in-tree, the tool is expected to be found
+# by its original name, typically with some build-directory prefix
+# prepended by the caller.
+proc gcc-transform-out-of-tree { args } {
+ global TESTING_IN_BUILD_TREE
+ if { [info exists TESTING_IN_BUILD_TREE] } {
+ return $args;
+ }
+ return [transform $args]
+}
+
set additional_prunes ""
set dg_runtest_extra_prunes ""