diff mbox series

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?)

Message ID 87wn1had8b.fsf@euler.schwinge.homeip.net
State New
Headers show
Series 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?) | expand

Commit Message

Thomas Schwinge May 9, 2023, 12:41 p.m. UTC
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
diff mbox series

Patch

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(-)

diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 92f650742290..aae7149a97df 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -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.
diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp
index 188d1a823561..7dd2d49d568e 100644
--- a/libgomp/testsuite/libgomp.c++/c++.exp
+++ b/libgomp/testsuite/libgomp.c++/c++.exp
@@ -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"
 }
diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp
index 31bdd5795dc2..e67adc8b378c 100644
--- a/libgomp/testsuite/libgomp.c/c.exp
+++ b/libgomp/testsuite/libgomp.c/c.exp
@@ -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
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index eb701311b6a0..5e8e15e7743e 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -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"
 }
diff --git a/libgomp/testsuite/libgomp.graphite/graphite.exp b/libgomp/testsuite/libgomp.graphite/graphite.exp
index 1260dc91ec21..1c5ea663af34 100644
--- a/libgomp/testsuite/libgomp.graphite/graphite.exp
+++ b/libgomp/testsuite/libgomp.graphite/graphite.exp
@@ -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
diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index 24a4d1f67b96..24ab8bb35ff5 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -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"
 }
diff --git a/libgomp/testsuite/libgomp.oacc-c/c.exp b/libgomp/testsuite/libgomp.oacc-c/c.exp
index 4bb2b2ac4949..8a960aafadc1 100644
--- a/libgomp/testsuite/libgomp.oacc-c/c.exp
+++ b/libgomp/testsuite/libgomp.oacc-c/c.exp
@@ -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
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index 7365b320668a..a56c7d903509 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -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