Skip to content

Commit

Permalink
[flang] Create a separate directory for unittests
Browse files Browse the repository at this point in the history
Some of the regression tests are C programs that act as test harnesses
for the compiler internals as opposed to being Fortran inputs to test
the compiler in action. The former style of tests are analog to LLVM's
unittests and will not use the lit framework.

Change-Id: I0ff10e23f66ff843e8fff4c35cfb6559b9dab762

Original-commit: flang-compiler/f18@2bfddbe
Reviewed-on: flang-compiler/f18#1027
Tree-same-pre-rewrite: false
  • Loading branch information
LukeIreland1 committed Mar 13, 2020
1 parent a9d9261 commit ee5fa1f
Show file tree
Hide file tree
Showing 28 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion flang/CMakeLists.txt
Expand Up @@ -154,7 +154,7 @@ enable_testing()
add_subdirectory(include/flang)
add_subdirectory(lib)
add_subdirectory(runtime)
add_subdirectory(test)
add_subdirectory(unittests)
add_subdirectory(tools)
add_subdirectory(test-lit)

Expand Down
Expand Up @@ -9,4 +9,3 @@
add_subdirectory(Decimal)
add_subdirectory(Evaluate)
add_subdirectory(Runtime)
add_subdirectory(Semantics)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -132,18 +132,6 @@ target_link_libraries(folding-test
FortranSemantics
)

set(FOLDING_TESTS
folding01.f90
folding02.f90
folding03.f90
folding04.f90
folding05.f90
folding06.f90
folding07.f90
folding08.f90
folding09.f90
)

add_test(Expression expression-test)
add_test(Integer integer-test)
add_test(Intrinsics intrinsics-test)
Expand All @@ -152,16 +140,3 @@ add_test(Real real-test)
add_test(RESHAPE reshape-test)
add_test(ISO-binding ISO-Fortran-binding-test)
add_test(folding folding-test)

set(TEST_LIBPGMATH "-pgmath=false")
if (LIBPGMATH_DIR)
find_library(LIBPGMATH pgmath PATHS ${LIBPGMATH_DIR})
if(LIBPGMATH)
set(TEST_LIBPGMATH "-pgmath=true")
endif()
endif()

foreach(test ${FOLDING_TESTS})
add_test(NAME ${test} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_folding.sh
${test} ${TEST_LIBPGMATH})
endforeach()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ee5fa1f

Please sign in to comment.