libgomp testsuite: Use 'lang_test_file_found' instead of 'lang_test_file' (was: libgomp testsuite: Only use 'blddir' if set (was: libgomp C++ testsuite: Don't compute 'blddir' twice (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?)
Checks
Commit Message
Hi!
On 2023-05-09T14:39:53+0200, I wrote:
> On 2023-05-09T14:36:53+0200, I wrote:
>> On 2014-11-04T10:31:37-0800, Mike Stump <mikestump@comcast.net> wrote:
>>> On Nov 4, 2014, at 4:13 AM, Thomas Schwinge <thomas@codesourcery.com> wrote:
>>>> On Wed, 15 Oct 2014 17:46:48 +0200, I wrote:
>>>>> [...]
>>>>>
>>>>> Am I on the right track with the following?
>>>>
>>>> Nobody commented, which also means nobody disagreed
>>>
>>> :-)
>>>
>>>> OK to commit all that to trunk?
>>>
>>> Ok, thanks.
>>
>> Almost one decade later (eek...) I'm now finally getting back to this.
>> First, a number of clean-up patches; rebased, adjusted, retested for
>> current state of affairs (not too much changed in libgomp testsuite
>> infrastructure, though).
Pushed to master branch commit 2ed5ceba0fe313ef09bdfe98788ba9377bfec9aa
"libgomp testsuite: Use 'lang_test_file_found' instead of 'lang_test_file'",
see attached.
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
From 2ed5ceba0fe313ef09bdfe98788ba9377bfec9aa Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 31 Oct 2014 17:38:03 +0100
Subject: [PATCH] libgomp testsuite: Use 'lang_test_file_found' instead of
'lang_test_file'
The value of 'lang_test_file' isn't actually used anywhere.
libgomp/
* testsuite/libgomp.c++/c++.exp: Don't set 'lang_test_file'.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
* testsuite/libgomp.c/c.exp: Unset 'lang_test_file_found' instead of
'lang_test_file'.
* testsuite/libgomp.oacc-c/c.exp: Likewise.
* testsuite/libgomp.graphite/graphite.exp: Likewise.
* testsuite/lib/libgomp.exp (libgomp_target_compile): Look for
'lang_test_file_found' instead of 'lang_test_file'.
---
libgomp/testsuite/lib/libgomp.exp | 4 ++--
libgomp/testsuite/libgomp.c++/c++.exp | 4 ----
libgomp/testsuite/libgomp.c/c.exp | 4 ++--
libgomp/testsuite/libgomp.fortran/fortran.exp | 4 ----
libgomp/testsuite/libgomp.graphite/graphite.exp | 4 ++--
libgomp/testsuite/libgomp.oacc-c++/c++.exp | 4 ----
libgomp/testsuite/libgomp.oacc-c/c.exp | 4 ++--
libgomp/testsuite/libgomp.oacc-fortran/fortran.exp | 4 ----
8 files changed, 8 insertions(+), 24 deletions(-)
@@ -234,13 +234,13 @@ proc libgomp_target_compile { source dest type options } {
global gluefile wrap_flags
global ALWAYS_CFLAGS
global GCC_UNDER_TEST
- global lang_test_file
+ global lang_test_file_found
global lang_library_path
global lang_link_flags
global lang_include_flags
global lang_source_re
- if { [info exists lang_test_file] } {
+ if { [info exists lang_test_file_found] } {
if { $blddir != "" } {
# Some targets use libgfortran.a%s in their specs, so they need
# a -B option for uninstalled testing.
@@ -30,19 +30,15 @@ set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
if { $blddir != "" } {
# Look for a static libstdc++ first.
if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] {
- set lang_test_file "${lang_library_path}/libstdc++.a"
set lang_test_file_found 1
# We may have a shared only build, so look for a shared libstdc++.
} elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] {
- set lang_test_file "${lang_library_path}/libstdc++.${shlib_ext}"
set lang_test_file_found 1
} else {
puts "No libstdc++ library found, will not execute c++ tests"
}
} elseif { [info exists GXX_UNDER_TEST] } {
set lang_test_file_found 1
- # Needs to exist for libgomp.exp.
- set lang_test_file ""
} else {
puts "GXX_UNDER_TEST not defined, will not execute c++ tests"
}
@@ -2,8 +2,8 @@ if [info exists lang_library_path] then {
unset lang_library_path
unset lang_link_flags
}
-if [info exists lang_test_file] then {
- unset lang_test_file
+if [info exists lang_test_file_found] then {
+ unset lang_test_file_found
}
if [info exists lang_include_flags] then {
unset lang_include_flags
@@ -26,19 +26,15 @@ if { $blddir != "" } {
set lang_include_flags "-fintrinsic-modules-path=${blddir}"
# Look for a static libgfortran first.
if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
- set lang_test_file "${lang_library_path}/libgfortran.a"
set lang_test_file_found 1
# We may have a shared only build, so look for a shared libgfortran.
} elseif [file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] {
- set lang_test_file "${lang_library_path}/libgfortran.${shlib_ext}"
set lang_test_file_found 1
} else {
puts "No libgfortran library found, will not execute fortran tests"
}
} elseif [info exists GFORTRAN_UNDER_TEST] {
set lang_test_file_found 1
- # Needs to exist for libgomp.exp.
- set lang_test_file ""
} else {
puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
}
@@ -18,8 +18,8 @@ if [info exists lang_library_path] then {
unset lang_library_path
unset lang_link_flags
}
-if [info exists lang_test_file] then {
- unset lang_test_file
+if [info exists lang_test_file_found] then {
+ unset lang_test_file_found
}
if [info exists lang_include_flags] then {
unset lang_include_flags
@@ -36,19 +36,15 @@ set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
if { $blddir != "" } {
# Look for a static libstdc++ first.
if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] {
- set lang_test_file "${lang_library_path}/libstdc++.a"
set lang_test_file_found 1
# We may have a shared only build, so look for a shared libstdc++.
} elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] {
- set lang_test_file "${lang_library_path}/libstdc++.${shlib_ext}"
set lang_test_file_found 1
} else {
puts "No libstdc++ library found, will not execute c++ tests"
}
} elseif { [info exists GXX_UNDER_TEST] } {
set lang_test_file_found 1
- # Needs to exist for libgomp.exp.
- set lang_test_file ""
} else {
puts "GXX_UNDER_TEST not defined, will not execute c++ tests"
}
@@ -4,8 +4,8 @@ if [info exists lang_library_path] then {
unset lang_library_path
unset lang_link_flags
}
-if [info exists lang_test_file] then {
- unset lang_test_file
+if [info exists lang_test_file_found] then {
+ unset lang_test_file_found
}
if [info exists lang_include_flags] then {
unset lang_include_flags
@@ -28,19 +28,15 @@ if { $blddir != "" } {
set lang_include_flags "-fintrinsic-modules-path=${blddir}"
# Look for a static libgfortran first.
if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
- set lang_test_file "${lang_library_path}/libgfortran.a"
set lang_test_file_found 1
# We may have a shared only build, so look for a shared libgfortran.
} elseif [file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] {
- set lang_test_file "${lang_library_path}/libgfortran.${shlib_ext}"
set lang_test_file_found 1
} else {
puts "No libgfortran library found, will not execute fortran tests"
}
} elseif [info exists GFORTRAN_UNDER_TEST] {
set lang_test_file_found 1
- # Needs to exist for libgomp.exp.
- set lang_test_file ""
} else {
puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
}
--
2.39.2