[gdb/testsuite] Handle missing xz in gdb.base/gnu-debugdata.exp

When running test-case gdb.base/gnu-debugdata.exp on SLE-11, I run into:
...
FAIL: gdb.base/gnu-debugdata.exp: xz
...

The fact that xz is not installed does not mean there's a fail, merely that
the test is unsupported.

Fix this by detecting the "spawn failed" reply in run_on_host and issuing
UNSUPPORTED instead.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-12-14  Tom de Vries  <tdevries@suse.de>

	PR testsuite/26963
	* lib/gdb.exp (run_on_host): Declare test unsupported if spawn fails.
This commit is contained in:
Tom de Vries
2020-12-14 17:05:11 +01:00
parent 519155c9f6
commit 18f1cb1fc5
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2020-12-14 Tom de Vries <tdevries@suse.de>
PR testsuite/26963
* lib/gdb.exp (run_on_host): Declare test unsupported if spawn fails.
2020-12-14 Tom de Vries <tdevries@suse.de>
PR testsuite/26962

View File

@ -7005,7 +7005,11 @@ proc run_on_host { test program args } {
return 0
} else {
verbose -log "run_on_host failed: $output"
if { $output == "spawn failed" } {
unsupported $test
} else {
fail $test
}
return -1
}
}