+2018-04-27 Maciej W. Rozycki <macro@mips.com>
+
+ * testsuite/lib/binutils-common.exp (match_target): New procedure.
+ * testsuite/lib/utils-lib.exp (run_dump_test): Use it in place
+ of `istarget' for matching with `target', `not-target', `skip'
+ and `not-skip' options.
+
2018-04-26 Nick Clifton <nickc@redhat.com>
* readelf.c (is_32bit_abs_reloc): Support R_PARISC_DIR32 as a
return 0
}
+# True if the target matches TARGET, specified as a TCL procedure if
+# in square brackets or as machine triplet otherwise.
+#
+proc match_target { target } {
+ if [string match {\[*\]} $target] {
+ return $target
+ } else {
+ return [istarget $target]
+ }
+}
+
# True if the ELF target supports STB_GNU_UNIQUE with the ELF header's
# OSABI field set to ELFOSABI_GNU.
#
# is useful if several .d files differ by options only. Options are
# always read from FILE.d.
#
-# target: GLOBS...
-# Run this test only on a specified list of targets. More precisely,
-# each glob in the space-separated list is passed to "istarget"; if
-# it evaluates true for any of them, the test will be run, otherwise
-# it will be marked unsupported.
-#
-# not-target: GLOBS...
-# Do not run this test on a specified list of targets. Again,
-# the each glob in the space-separated list is passed to
-# "istarget", and the test is run if it evaluates *false* for
-# *all* of them. Otherwise it will be marked unsupported.
-#
-# skip: GLOBS...
-# not-skip: GLOBS...
+# target: GLOB|PROC ...
+# Run this test only on a specified list of targets. More precisely,
+# in the space-separated list each glob is passed to "istarget" and
+# each proc is called as a TCL procedure. List items are interpreted
+# such that procs are denoted by surrounding square brackets, and any
+# other items are consired globs. If the call evaluates true for any
+# of them, the test will be run, otherwise it will be marked
+# unsupported.
+#
+# not-target: GLOB|PROC ...
+# Do not run this test on a specified list of targets. Again, each
+# glob in the space-separated list is passed to "istarget" and each
+# proc is called as a TCL procedure, and the test is run if it
+# evaluates *false* for *all* of them. Otherwise it will be marked
+# unsupported.
+#
+# skip: GLOB|PROC ...
+# not-skip: GLOB|PROC ...
# These are exactly the same as "not-target" and "target",
# respectively, except that they do nothing at all if the check
# fails. They should only be used in groups, to construct a single
return
}
foreach glob $opts(skip) {
- if {[istarget $glob]} { return }
+ if {[match_target $glob]} { return }
}
}
if { $opts(not-skip) != "" } then {
set skip 1
foreach glob $opts(not-skip) {
- if {[istarget $glob]} {
+ if {[match_target $glob]} {
set skip 0
break
}
if { $opts(target) != "" } then {
set skip 1
foreach glob $opts(target) {
- if {[istarget $glob]} {
+ if {[match_target $glob]} {
set skip 0
break
}
}
if { $opts(not-target) != "" } then {
foreach glob $opts(not-target) {
- if {[istarget $glob]} {
+ if {[match_target $glob]} {
unsupported $testname
return
}
+2018-04-27 Maciej W. Rozycki <macro@mips.com>
+
+ * testsuite/lib/gas-defs.exp (run_dump_test): Use `match_target'
+ in place of `istarget' for matching with `target', `not-target',
+ `skip' and `not-skip' options.
+
2018-04-26 Nick Clifton <nickc@redhat.com>
* as.c (flag_generate_build_notes): New variable.
# is useful if several .d files differ by options only. Options are
# always read from FILE.d.
#
-# target: GLOBS...
-# Run this test only on a specified list of targets. More precisely,
-# each glob in the space-separated list is passed to "istarget"; if
-# it evaluates true for any of them, the test will be run, otherwise
-# it will be marked unsupported.
+# target: GLOB|PROC ...
+# Run this test only on a specified list of targets. More precisely,
+# in the space-separated list each glob is passed to "istarget" and
+# each proc is called as a TCL procedure. List items are interpreted
+# such that procs are denoted by surrounding square brackets, and any
+# other items are consired globs. If the call evaluates true for any
+# of them, the test will be run, otherwise it will be marked
+# unsupported.
#
-# not-target: GLOBS...
-# Do not run this test on a specified list of targets. Again,
-# the each glob in the space-separated list is passed to
-# "istarget", and the test is run if it evaluates *false* for
-# *all* of them. Otherwise it will be marked unsupported.
+# not-target: GLOB|PROC ...
+# Do not run this test on a specified list of targets. Again, each
+# glob in the space-separated list is passed to "istarget" and each
+# proc is called as a TCL procedure, and the test is run if it
+# evaluates *false* for *all* of them. Otherwise it will be marked
+# unsupported.
#
-# skip: GLOBS...
-# not-skip: GLOBS...
+# skip: GLOB|PROC ...
+# not-skip: GLOB|PROC ...
# These are exactly the same as "not-target" and "target",
# respectively, except that they do nothing at all if the check
# fails. They should only be used in groups, to construct a single
return
}
foreach glob $opts(skip) {
- if {[istarget $glob]} { return }
+ if {[match_target $glob]} { return }
}
}
if { $opts(not-skip) != "" } then {
set skip 1
foreach glob $opts(not-skip) {
- if {[istarget $glob]} {
+ if {[match_target $glob]} {
set skip 0
break
}
}
set skip 1
foreach glob $opts(target) {
- if {[istarget $glob]} {
+ if {[match_target $glob]} {
set skip 0
break
}
}
if { $opts(not-target) != "" } then {
foreach glob $opts(not-target) {
- if {[istarget $glob]} {
+ if {[match_target $glob]} {
unsupported $testname
return
}
+2018-04-27 Maciej W. Rozycki <macro@mips.com>
+
+ * testsuite/lib/ld-lib.exp (run_dump_test): Use `match_target'
+ in place of `istarget' for matching with `target', `alltargets'
+ and `notarget' options.
+
2018-04-27 Alan Modra <amodra@gmail.com>
* po/BLD-POTFILES.in: Regenerate.
# once.
#
# target: TARGET
-# Only run the test for TARGET. This may occur more than once; the
-# target being tested must match at least one. You may provide target
-# name "cfi" for any target supporting the CFI statements. You may
-# provide target name "shared" for any target supporting shared
-# libraries.
+# Only run the test for TARGET.
+# You may provide target name "cfi" for any target supporting the
+# CFI statements. You may provide target name "shared" for any
+# target supporting shared libraries. Otherwise TARGET is called
+# as a TCL procedure if surrounded by square brackets, or passed
+# to "istarget" if not.
+# This may occur more than once; the target being tested must match
+# at least one.
#
# alltargets: TARGET
-# Only run the test for TARGET. This may occur more than once; the
-# target being tested must match all of them.
+# Only run the test for TARGET.
+# The syntax for TARGET is as with 'target'.
+# This may occur more than once; the target being tested must match
+# all of them.
#
# notarget: TARGET
-# Do not run the test for TARGET. This may occur more than once;
-# the target being tested must not match any of them.
+# Do not run the test for TARGET.
+# The syntax for TARGET is as with 'target'.
+# This may occur more than once; the target being tested must not
+# match any of them.
#
# error: REGEX
# An error with message matching REGEX must be emitted for the test
if { [llength $opts(target)] > 0 } {
set targmatch 0
foreach targ $opts(target) {
- if [istarget $targ] {
+ if [match_target $targ] {
set targmatch 1
break
}
}
}
foreach targ $opts(alltargets) {
- if ![istarget $targ] {
+ if ![match_target $targ] {
return
}
}
foreach targ $opts(notarget) {
- if [istarget $targ] {
+ if [match_target $targ] {
return
}
}