Skip to content

Commit

Permalink
Run fparse-llvm isntrumentor on Fortran test files
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeekman committed Dec 12, 2024
1 parent 319c42f commit 4beb1cb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ if(MLIR_FOUND AND Flang_FOUND)

install(TARGETS salt-flang-plugin DESTINATION lib)

configure_file(${CMAKE_SOURCE_DIR}/src/fparse-llvm.in ${CMAKE_BINARY_DIR}/fparse-llvm @ONLY)
install(PROGRAMS ${CMAKE_BINARY_DIR}/fparse-llvm
TYPE BIN)

else()
message(STATUS "Flang not found -- skipping Flang frontend plugin")
endif()
Expand Down Expand Up @@ -593,3 +597,26 @@ endfunction()
foreach(test_source IN LISTS TESTS_LIST)
compile_instrumented(${test_source})
endforeach()

# Add some Fortran tests for SALT-FM
set(FORTRAN_TESTS_SOURCES_LIST
myhi.f
cubes.f
emptyprog.f90
funcsub.f90
hello.f90
loop_test.f90
trivial.f90
)

foreach(test_source IN LISTS FORTRAN_TESTS_SOURCES_LIST)
add_test(NAME instrument_${test_source}
COMMAND ./fparse-llvm ${CMAKE_SOURCE_DIR}/tests/fortran/${test_source}
)
set_tests_properties(instrument_${test_source}
PROPERTIES
REQUIRED_FILES "${CMAKE_BINARY_DIR}/fparse-llvm"
ENVIRONMENT "SALT_FORTRAN_CONFIG_FILE=${CMAKE_SOURCE_DIR}/config_files/tau_fortran_config.yaml"
PASS_REGULAR_EXPRESSION "SALT Instrumentor Plugin finished"
)
endforeach()
File renamed without changes.

0 comments on commit 4beb1cb

Please sign in to comment.