Skip to content

Commit 4bd6f80

Browse files
authored
Always pass NO_STOP_MESSAGE to Fortran tests (#185)
1 parent 1645589 commit 4bd6f80

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

Fortran/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ if (NOT WIN32 AND NOT APPLE)
1717
add_subdirectory(gfortran)
1818
endif()
1919
endif()
20+
21+
file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")

Fortran/Readme.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
By default LLVM flang prints a stop message in certain circumstances that
2+
breaks some of the tests in this directory. As such we add the environment
3+
variable NO_STOP_MESSAGE=1 to disable this behaviour. If we wish to add tests
4+
in future that need to check the stop message, those can be added in a
5+
subdirectory with a lit.local.cfg that unsets this environment variable.
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
config.traditional_output = True
22
config.single_source = True
3-
4-
# Flang uses NO_STOP_MESSAGE to control the output of the STOP statement. If
5-
# it is present in the environment, we should forward it to the tests, otherwise
6-
# they might choke on warnings about signaling INEXACT exceptions.
7-
if "NO_STOP_MESSAGE" in os.environ:
8-
config.environment["NO_STOP_MESSAGE"] = os.environ["NO_STOP_MESSAGE"]
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
config.traditional_output = True
22
config.single_source = True
3-
4-
# Flang uses NO_STOP_MESSAGE to control the output of the STOP statement. If
5-
# it is present in the environment, we should forward it to the tests, otherwise
6-
# they might choke on warnings about signaling INEXACT exceptions.
7-
if "NO_STOP_MESSAGE" in os.environ:
8-
config.environment["NO_STOP_MESSAGE"] = os.environ["NO_STOP_MESSAGE"]

Fortran/lit.local.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Flang uses NO_STOP_MESSAGE to control the output of the STOP statement.
2+
# We should set it for running the tests, otherwise they might choke on warnings
3+
# about signaling INEXACT exceptions.
4+
config.environment["NO_STOP_MESSAGE"] = "1"

0 commit comments

Comments
 (0)