diff options
author | Clément Chigot <chigot@adacore.com> | 2022-09-14 11:27:07 +0200 |
---|---|---|
committer | Clément Chigot <chigot@adacore.com> | 2022-09-22 09:23:18 +0200 |
commit | 3581ae2d450f2c885d9d964668b56ba0cffc83fa (patch) | |
tree | f9bac48db547e2f877c0c1a289f7a91cb4f6dc01 | |
parent | 0383bce6502271455804daa533c9d141e7c3fc98 (diff) | |
download | gdb-3581ae2d450f2c885d9d964668b56ba0cffc83fa.zip gdb-3581ae2d450f2c885d9d964668b56ba0cffc83fa.tar.gz gdb-3581ae2d450f2c885d9d964668b56ba0cffc83fa.tar.bz2 |
ld/testsuite: skip bootstrap.exp when OFILES are missing
OFILES are normally provided through an environment variable set by
Makefiles. However, when launching the testsuite directly through
runtest outside the build tree, it can be hard to retrieve them.
Thus, they can be missing.
Instead of letting tcl raise an error when trying to access this
OFILES variable, skip bootstrap.exp if it doesn't exist.
ld/ChangeLog:
* testsuite/ld-bootstrap/bootstrap.exp: Skip if OFILES is
missing
-rw-r--r-- | ld/testsuite/ld-bootstrap/bootstrap.exp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index f6d38af..52a91fc 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -29,6 +29,12 @@ if ![isnative] { return } +# Skip if OFILES aren't provided, it can happen when lauching +# the testsuites outside the build directory. +if {![info exists OFILES]} { + return +} + # Skip for -fprofile-generate=. catch "exec $nm $plug_opt $OFILES" exec_output send_log "foo: $exec_output" |