[gdb/testsuite] Fix regexp in skip_opencl_tests
authorTom de Vries <tdevries@suse.de>
Tue, 17 Sep 2019 11:57:09 +0000 (13:57 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 17 Sep 2019 11:57:09 +0000 (13:57 +0200)
commitfafa92ec3ca92e06fdea8f0f6a0fb08f5f906f77
tree19d2b30eab6486290f2d6a8b2effe8c1b3faae1e
parent6f4f8f476a4e41cc7117a8e85087963c0ac3e95b
[gdb/testsuite] Fix regexp in skip_opencl_tests

[ Backport of master commit d2b584a55b. ]

When running gdb-caching-proc.exp, if skip_opencl_tests fails like this:
...
(gdb) run
Starting program: \
  build/gdb/testsuite/outputs/gdb.base/gdb-caching-proc/opencltest13530.x
CHK_ERR (clGetPlatformIDs (1, &platform, NULL), -1001)
src/gdb/testsuite/lib/opencl_hostapp.c:73 error: Unknown
[Inferior 1 (process 13600) exited with code 01]
(gdb)
skip_opencl_tests: OpenCL support not detected
...
then this regexp in skip_opencl_tests fails to match:
...
        -re ".*$inferior_exited_re code.*${gdb_prompt} $" {
...
so instead we hit the default clause after a 30 seconds timeout.  With the
iteration count set at 10, we end up taking 6 minutes to run this test-case.

Fix this by adding the missing "with" in the regexp, bring back the runtime to
half a minute.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-04-29  Tom de Vries  <tdevries@suse.de>

PR testsuite/25005
* lib/opencl.exp (skip_opencl_tests): Add missing "with" in regexp.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/opencl.exp