[flang] Create a separate directory for unittests

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@2bfddbe8f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/1027
Tree-same-pre-rewrite: false
This commit is contained in:
Luke Ireland 2020-02-19 15:49:33 +00:00
parent a9d9261cf3
commit ee5fa1f233
28 changed files with 1 additions and 27 deletions

View File

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

View File

@ -9,4 +9,3 @@
add_subdirectory(Decimal)
add_subdirectory(Evaluate)
add_subdirectory(Runtime)
add_subdirectory(Semantics)

View File

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