Skip to content

Commit

Permalink
Adding environment variables to tests
Browse files Browse the repository at this point in the history
Disabling the asynchronous thread for the apex_version test, there
is a race condition somewhere that causes apex to crash 1% of the time
for this short test that prints the apex version. I thought I have
fixed it multiple times but I am tired of playing whack-a-mole
for this short test.
  • Loading branch information
khuck committed May 21, 2024
1 parent 0b2e5ba commit dbcf633
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unit_tests/C++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ set_property (TEST test_apex_malloc_cpp APPEND PROPERTY ENVIRONMENT
set_property (TEST test_apex_malloc_cpp APPEND PROPERTY ENVIRONMENT
"APEX_TRACK_CPU_MEMORY=1")

set_tests_properties(test_apex_version_cpp PROPERTIES ENVIRONMENT "APEX_PROC_SELF_STATUS=0;APEX_PROC_STAT=0")

# Make sure the compiler can find include files from our Apex library.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_COMPILE_FLAGS}")
include_directories (. ${APEX_SOURCE_DIR}/src/apex ${MPI_CXX_INCLUDE_PATH})
Expand Down
1 change: 1 addition & 0 deletions src/unit_tests/C/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ if(OpenACC_C_FOUND AND OpenACCProfiling_FOUND)
endif(OpenACC_C_FOUND AND OpenACCProfiling_FOUND)

set_tests_properties(test_apex_disable PROPERTIES ENVIRONMENT "APEX_DISABLE=1")
set_tests_properties(test_apex_version PROPERTIES ENVIRONMENT "APEX_PROC_SELF_STATUS=0;APEX_PROC_STAT=0")
if(APEX_ERROR_HANDLING)
set_tests_properties(test_crasher PROPERTIES WILL_FAIL TRUE)
endif(APEX_ERROR_HANDLING)
Expand Down

0 comments on commit dbcf633

Please sign in to comment.