diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2024-04-26 18:15:24 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2024-05-17 12:58:18 +0100 |
commit | e449709833b862c14b5665093b3d4cbd4cd275eb (patch) | |
tree | 965f29d78816a3f03598441f12578557316d23ae /libctf/testsuite | |
parent | 26f0f80b6fbccc652ef363ff9e608c12c99df0c6 (diff) | |
download | binutils-e449709833b862c14b5665093b3d4cbd4cd275eb.zip binutils-e449709833b862c14b5665093b3d4cbd4cd275eb.tar.gz binutils-e449709833b862c14b5665093b3d4cbd4cd275eb.tar.bz2 |
libctf: test: add host
This .lk option lets you execute particular tests only on specific host
architectures.
libctf/
* testsuite/lib/ctf-lib.exp (run_lookup_test): Add host.
Diffstat (limited to 'libctf/testsuite')
-rw-r--r-- | libctf/testsuite/lib/ctf-lib.exp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libctf/testsuite/lib/ctf-lib.exp b/libctf/testsuite/lib/ctf-lib.exp index 523a8c3..c31573e 100644 --- a/libctf/testsuite/lib/ctf-lib.exp +++ b/libctf/testsuite/lib/ctf-lib.exp @@ -109,6 +109,9 @@ proc compile_link_one_host_cc { src output additional_args } { # no_cross: # If set, do not run this test when host != target. # +# host: +# If set, only run this test on hosts matching the given glob. +# # Each option may occur at most once unless otherwise mentioned. # # After the option lines come regexp lines. run_lookup_test calls @@ -147,6 +150,7 @@ proc run_lookup_test { name } { set opts(source) {} set opts(xfail) {} set opts(no_cross) {} + set opts(host) {} foreach i $opt_array { set opt_name [lindex $i 0] @@ -170,6 +174,11 @@ proc run_lookup_test { name } { return } + if { [llength $opts(host)] != 0 && ![ishost $opts(host)] } { + untested "$subdir/$name only runs on $opts(host)" + return + } + if { [llength $opts(lookup)] == 0 } { set opts(lookup) "$file.c" } else { |