TriBITSPub / TriBITS

TriBITS: Tribal Build, Integrate, and Test System,
http://tribits.org
Other
36 stars 46 forks source link

Add RUN_SERIAL to tribits_add_executable_and_test() (#554) #555

Closed bartlettroscoe closed 1 year ago

bartlettroscoe commented 1 year ago

Addresses #554.

It was an oversight that this was not added to tribits_add_executable_and_test() when it was added to tribits_add_test().

I tested this against Trilinos and the warning reported in https://github.com/trilinos/Trilinos/issues/11411 went away.

bartlettroscoe commented 1 year ago

Also, I inspected the generated Trilinos file packages/stokhos/test/UnitTest/CTestTestfile.cmake and saw:

set_tests_properties(Stokhos_TpetraMatVec_MPI_4 PROPERTIES  ... RUN_SERIAL "ON" ...)

which is created from:

https://github.com/trilinos/Trilinos/blob/281650bb58e683daff5c41c90e22bbe3c407afc0/packages/stokhos/test/UnitTest/CMakeLists.txt#L865-L874

which was:

IF (Stokhos_ENABLE_Tpetra)
  TRIBITS_ADD_EXECUTABLE_AND_TEST(
    TpetraMatVec
    SOURCES tpetra_mat_vec.cpp
    COMM serial mpi
    STANDARD_PASS_OUTPUT
    #NUM_MPI_PROCS 4
    RUN_SERIAL
    )
ENDIF()

This validates that the RUN_SERIAL option was passed to the tribits_add_test() function correctly and that it was interpreted correctly by that function to set the RUN_SERIAL ctest property.