diff options
author | Tom Tromey <tom@tromey.com> | 2023-02-22 14:49:47 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-10 08:21:46 -0700 |
commit | 450d26c851c15e08249fc0fdeb3a06b31ac4fcfd (patch) | |
tree | 828224a9e444e3e3a0ea672ddb88cad7eb4c5ef6 /gdb/testsuite/gdb.fortran | |
parent | 1cd0716eb199963ec63fcafa94699d14bbf45e01 (diff) | |
download | binutils-450d26c851c15e08249fc0fdeb3a06b31ac4fcfd.zip binutils-450d26c851c15e08249fc0fdeb3a06b31ac4fcfd.tar.gz binutils-450d26c851c15e08249fc0fdeb3a06b31ac4fcfd.tar.bz2 |
Use require with target_info
This changes many tests to use 'require' when checking target_info.
In a few spots, the require is hoisted to the top of the file, to
avoid doing any extra work when the test is going to be skipped
anyway.
Diffstat (limited to 'gdb/testsuite/gdb.fortran')
-rw-r--r-- | gdb/testsuite/gdb.fortran/array-slices.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/lbound-ubound.exp | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp index 56bed15..ce17b8d 100644 --- a/gdb/testsuite/gdb.fortran/array-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices.exp @@ -36,9 +36,7 @@ require allow_fortran_tests # This test relies on output from the inferior. -if [target_info exists gdb,noinferiorio] { - return -1 -} +require {!target_info exists gdb,noinferiorio} standard_testfile ".f90" load_lib fortran.exp diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp index bb652a9..fced41f 100644 --- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp +++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp @@ -17,6 +17,9 @@ require allow_fortran_tests +# This test relies on output from the inferior. +require {!target_info exists gdb,noinferiorio} + standard_testfile ".F90" load_lib fortran.exp @@ -32,11 +35,6 @@ if ![fortran_runto_main] { return -1 } -# This test relies on output from the inferior. -if [target_info exists gdb,noinferiorio] { - return 0 -} - # Avoid libc symbols, in particular the 'array' type. gdb_test_no_output "nosharedlibrary" |