]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: test: add host
authorNick Alcock <nick.alcock@oracle.com>
Fri, 26 Apr 2024 17:15:24 +0000 (18:15 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 17 May 2024 11:58:18 +0000 (12:58 +0100)
This .lk option lets you execute particular tests only on specific host
architectures.

libctf/
* testsuite/lib/ctf-lib.exp (run_lookup_test): Add host.

libctf/testsuite/lib/ctf-lib.exp

index 523a8c31e1e33601f1f0a16a16821ab7bee66e42..c31573efa0297e7623723a4f075dbd650bd8213e 100644 (file)
@@ -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 {