Skip to content

Fix Fortran tests for Windows platform #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Fortran/SNAP/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ if(PROJECT_NAME STREQUAL "test-suite")
snap.reference_output
)
set(DIFFPROG_BASE %b/${FPCMP})
if(FP_IGNOREWHITESPACE)
set(DIFFPROG_BASE "${DIFFPROG_BASE} -i")
endif()
set(FP_TOL_SUFFIX "-r ${FP_TOLERANCE}")
set(FP_ABSTOL_SUFFIX "-a ${FP_ABSTOLERANCE}")
set(DIFFPROG
Expand Down
7 changes: 5 additions & 2 deletions Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ endif()
# Skip some tests that currently fail with flang on AArch64 when using libpgmath.
# FIXME: Reenable these tests after libpgmath is fixed or after we no longer
# depend on it.
if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang" AND ARCH STREQUAL "AArch64")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang"
AND (ARCH STREQUAL "AArch64" OR TARGET_OS STREQUAL "Windows"))
Comment on lines +85 to +86
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, the tests will be disabled on Windows on all hardware platforms and will be disabled on all OS'es on AArch64. I just want to double-check that this is what you intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This fails on windows regardless of the underlying architecture. I am currently trying to enable everything which works.

# Regex because the GLOB returns the full path to each file
list(FILTER Source EXCLUDE REGEX "FM813\.f$")
list(FILTER Source EXCLUDE REGEX "FM815\.f$")
Expand All @@ -94,7 +95,9 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang" AND ARCH STREQUAL "AArch64")
endif()

set(FP_TOLERANCE 1.0e-11) # set by the most sensitive numerical test
set(FP_IGNOREWHITESPACE OFF)
if (NOT TARGET_OS STREQUAL "Windows")
set(FP_IGNOREWHITESPACE OFF)
endif()
llvm_singlesource()

file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")