[testsuite] Unset 'offload_target' after use
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 1 Jul 2020 10:33:59 +0000 (12:33 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 24 Jul 2020 12:00:43 +0000 (14:00 +0200)
commitfdc9db25395e5a6e77069c04fe713f165a9c52a4
tree207631fdeb1534cb6ad2e91753b92c90312353e6
parent3407bfc136bb6b9cf8e25eb753b448b527590b3b
[testsuite] Unset 'offload_target' after use

..., so that we don't leak this into '*.exp' files running later.

This is relevant after commit efc16503ca10bc0e934e0bace5777500e4dc757a "handle
dumpbase in offloading, adjust testsuite" -- I was confused why in a
(simplified) testing sequence as follows:

  default 'libgomp.c/c.exp'
  default 'libgomp.oacc-c/c.exp'
  '-m32' 'libgomp.c/c.exp'
  '-m32' 'libgomp.oacc-c/c.exp'

..., the "'-m32' 'libgomp.c/c.exp'" variant would not execute any offloading
dump scanning.  The reason is that the "default 'libgomp.oacc-c/c.exp'" variant
ends with 'offload_target=disable' set, so that's what the "'-m32'
'libgomp.c/c.exp'" variant would then see, in particular
'gcc/testsuite/lib/scanoffload.exp:scoff'.

libgomp/
* testsuite/libgomp.oacc-c++/c++.exp: Unset 'offload_target' after
use.
* testsuite/libgomp.oacc-c/c.exp: Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
libgomp/testsuite/libgomp.oacc-c++/c++.exp
libgomp/testsuite/libgomp.oacc-c/c.exp
libgomp/testsuite/libgomp.oacc-fortran/fortran.exp