diff options
author | Alexandre Oliva <oliva@adacore.com> | 2020-07-24 15:38:42 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2020-07-24 16:13:53 -0300 |
commit | 49341f3bd40220172c199aee7d4ff0a19ecc46d8 (patch) | |
tree | aa0219b966a83a3bab565a3d5d50f73dd92fbf67 | |
parent | 0e3ad7e4d030b5bd3598cd3955947e3130a24339 (diff) | |
download | gcc-49341f3bd40220172c199aee7d4ff0a19ecc46d8.zip gcc-49341f3bd40220172c199aee7d4ff0a19ecc46d8.tar.gz gcc-49341f3bd40220172c199aee7d4ff0a19ecc46d8.tar.bz2 |
add offload target to testname for pass/fail message
Offload tests that scan dump files may run multiple times, once per
offload target, but the test result messages do not mention the
offload target, so we may seem to have repeated results. Fixed by
modifying the test name so that it contains the offload target name.
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
for gcc/testsuite/ChangeLog
* lib/scanoffload.exp (scoff-testname, scoff-adjust): New.
(scoff): Call them.
-rw-r--r-- | gcc/testsuite/lib/scanoffload.exp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/testsuite/lib/scanoffload.exp b/gcc/testsuite/lib/scanoffload.exp index 1a26e44..9071769 100644 --- a/gcc/testsuite/lib/scanoffload.exp +++ b/gcc/testsuite/lib/scanoffload.exp @@ -22,6 +22,19 @@ proc scoff-format { offtgt suffix } { return ".x$offtgt.mkoffload$suffix" } +# Adjust an offload dump TESTNAME for offload TARGET. +proc scoff-testname { target testname } { + return "$target-$testname" +} + +# Adjust the arglist ARGS, so that argument IDX gets scoff-formatted, +# and argument 0 (the test name) gets scoff-testnamed. +proc scoff-adjust { args idx target } { + lset args $idx "[scoff-format $target [lindex $args $idx]]" + lset args 0 "[scoff-testname $target [lindex $args 0]]" + return $args +} + # Wrapper for scan procs. # Argument 0 is the index of the argument to replace when calling # argument 1 with the remaining arguments. Use end-1 or end or so. @@ -34,7 +47,7 @@ proc scoff { args } { if [info exists offload_target] { set target $offload_target if { "$target" != "disable" } { - eval $prc [lreplace $args $idx $idx "[scoff-format $target [lindex $args $idx]]"] + eval $prc [scoff-adjust $args $idx $target] } } else { global offload_targets @@ -42,7 +55,7 @@ proc scoff { args } { # HSA offloading is doing things differently, doesn't use 'mkoffload'. if { "$target" == "hsa" } continue - eval $prc [lreplace $args $idx $idx "[scoff-format $target [lindex $args $idx]]"] + eval $prc [scoff-adjust $args $idx $target] } } } |