mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
binutils testsuite: canonicalize subtest names in libctf
Previous code included the full $srcdir pathnames in the individual subtest PASS/FAIL names, which makes it difficult to compute comparisons or regressions between test runs on different machines. This version switches to the basename only, which are common. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
This commit is contained in:
parent
3babc2e220
commit
4eb048d448
@ -136,11 +136,13 @@ proc run_lookup_test { name } {
|
|||||||
} else {
|
} else {
|
||||||
set file "$srcdir/$subdir/$name"
|
set file "$srcdir/$subdir/$name"
|
||||||
}
|
}
|
||||||
|
# strip off the srcdir, which contains build host specific pathnames
|
||||||
|
set file4log [string map [list $srcdir/ ""] $file]
|
||||||
|
|
||||||
set opt_array [slurp_options "${file}.lk"]
|
set opt_array [slurp_options "${file}.lk"]
|
||||||
if { $opt_array == -1 } {
|
if { $opt_array == -1 } {
|
||||||
perror "error reading options from $file.lk"
|
perror "error reading options from $file.lk"
|
||||||
unresolved $subdir/$name
|
unresolved $file4log
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
set run_ld 0
|
set run_ld 0
|
||||||
@ -166,7 +168,7 @@ proc run_lookup_test { name } {
|
|||||||
}
|
}
|
||||||
if ![info exists opts($opt_name)] {
|
if ![info exists opts($opt_name)] {
|
||||||
perror "unknown option $opt_name in file $file.lk"
|
perror "unknown option $opt_name in file $file.lk"
|
||||||
unresolved $subdir/$name
|
unresolved $file4log
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,12 +177,12 @@ proc run_lookup_test { name } {
|
|||||||
|
|
||||||
if { [llength $opts(no_cross)] != 0
|
if { [llength $opts(no_cross)] != 0
|
||||||
&& "$TEST_CROSS" eq "yes" } {
|
&& "$TEST_CROSS" eq "yes" } {
|
||||||
untested "$subdir/$name not tested when cross-compiling"
|
untested "$file4log not tested when cross-compiling"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [llength $opts(host)] != 0 && ![ishost $opts(host)] } {
|
if { [llength $opts(host)] != 0 && ![ishost $opts(host)] } {
|
||||||
untested "$subdir/$name only runs on $opts(host)"
|
untested "$file4log only runs on $opts(host)"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,10 +205,7 @@ proc run_lookup_test { name } {
|
|||||||
set shared ""
|
set shared ""
|
||||||
}
|
}
|
||||||
|
|
||||||
set testname $opts(name)
|
set testname $file4log
|
||||||
if { $opts(name) == "" } {
|
|
||||||
set testname "$subdir/$name"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Compile and link the lookup program.
|
# Compile and link the lookup program.
|
||||||
set comp_output [prune_warnings [compile_link_one_host_cc $opts(lookup) "tmpdir/lookup" "libctf.la $opts(lookup_link)"]]
|
set comp_output [prune_warnings [compile_link_one_host_cc $opts(lookup) "tmpdir/lookup" "libctf.la $opts(lookup_link)"]]
|
||||||
|
@ -25,7 +25,7 @@ global testname
|
|||||||
global subsrcdir
|
global subsrcdir
|
||||||
|
|
||||||
set subsrcdir "$srcdir/$subdir/"
|
set subsrcdir "$srcdir/$subdir/"
|
||||||
set testname "$dir/libctf-repeat-cu.exp"
|
set testname "libctf-repeat-cu.exp"
|
||||||
|
|
||||||
if ![is_elf_format] {
|
if ![is_elf_format] {
|
||||||
unsupported "CTF needs bfd changes to be emitted on non-ELF"
|
unsupported "CTF needs bfd changes to be emitted on non-ELF"
|
||||||
|
Loading…
Reference in New Issue
Block a user