Skip to content

Commit

Permalink
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
  • Loading branch information
LukeIreland1 committed Mar 13, 2020
1 parent 4de19d7 commit 2bfddbe
Show file tree
Hide file tree
Showing 28 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
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
1 change: 0 additions & 1 deletion test/CMakeLists.txt → unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
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.
25 changes: 0 additions & 25 deletions test/Evaluate/CMakeLists.txt → unittests/Evaluate/CMakeLists.txt
Original file line number Diff line number Diff line change
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.
File renamed without changes.
File renamed without changes.

0 comments on commit 2bfddbe

Please sign in to comment.