Skip to content

Commit

Permalink
Fixed Tribits bug 6420
Browse files Browse the repository at this point in the history
https://software.sandia.gov/bugzilla/show_bug.cgi?id=6420
FAIL_REGULAR_EXPRESSION now works correctly.

Tested by running before/after tests of a fairly complete Trilinos
build.  These results are what I expected, as explained below.

-------
BEFORE:  The "testfail" tests expose the Tribits bug; we expect these
tests to fail without the fix.

99% tests passed, 3 tests failed out of 470

Label Time Summary:
Amesos       =  23.39 sec
Amesos2      =  11.36 sec
Belos        = 372.73 sec
Epetra       =  71.99 sec
EpetraExt    =  27.19 sec
Galeri       =  11.35 sec
Ifpack       =  17.80 sec
Ifpack2      =  93.89 sec
MueLu        = 1571.20 sec
Tpetra       = 165.59 sec
Triutils     =   2.28 sec
Zoltan       = 776.31 sec
Zoltan2      = 270.09 sec

Total Test time (real) = 3411.81 sec

The following tests FAILED:
        249 - Belos_bl_gmres_complex_hb_4_MPI_4 (Failed)
        370 - Zoltan2_testfail1_MPI_4 (Failed)
        371 - Zoltan2_testfail2_MPI_4 (Failed)
Errors while running CTest

-------
AFTER:  The "testfail" tests no longer fail.  One Zoltan2 test now
fails; this result is expected, as it is the test that alerted me
to the TriBits bug.

99% tests passed, 2 tests failed out of 470

Label Time Summary:
Amesos       =  20.19 sec
Amesos2      =  20.72 sec
Belos        = 548.29 sec
Epetra       =  72.02 sec
EpetraExt    =  36.17 sec
Galeri       =  13.06 sec
Ifpack       =  30.54 sec
Ifpack2      =  93.12 sec
MueLu        = 1290.72 sec
Tpetra       = 224.15 sec
Triutils     =   2.49 sec
Zoltan       = 816.26 sec
Zoltan2      = 225.59 sec

Total Test time (real) = 3388.49 sec

The following tests FAILED:
        249 - Belos_bl_gmres_complex_hb_4_MPI_4 (Failed)
        380 - Zoltan2_coordinateDriverTest_MPI_4 (Failed)
Errors while running CTest

Note that Belos test 249 fails both BEFORE and AFTER.
  • Loading branch information
kddevin committed Oct 27, 2015
1 parent df5bdf6 commit c9f5e7b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmake/tribits/core/package_arch/TribitsAddTestHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ INCLUDE(MessageWrapper)

FUNCTION(TRIBITS_SET_TESTS_PROPERTIES)
IF (NOT TRIBITS_ADD_TEST_ADD_TEST_UNITTEST)
SET_TESTS_PROPERTIES(${ARGN})
SET_TESTS_PROPERTIES(${ARGV0} ${ARGV1} ${ARGV2} "${ARGV3}")
ENDIF()
IF (TRIBITS_SET_TEST_PROPERTIES_CAPTURE_INPUT)
APPEND_GLOBAL_SET(TRIBITS_SET_TEST_PROPERTIES_INPUT ${ARGN})
Expand Down Expand Up @@ -591,10 +591,8 @@ FUNCTION(TRIBITS_PRIVATE_ADD_TEST_SET_PASSFAIL_PROPERTIES TEST_NAME_IN)

# FAIL_REGULAR_EXPRESSION

SET(FAIL_REGEX_STRINGS "")

IF (PARSE_FAIL_REGULAR_EXPRESSION)
IF (FAIL_REGEX_STR)
IF (FAIL_REGEX_STRINGS)
SET(FAIL_REGEX_STRINGS "${FAIL_REGEX_STRINGS};${PARSE_FAIL_REGULAR_EXPRESSION}")
ELSE()
SET(FAIL_REGEX_STRINGS "${PARSE_FAIL_REGULAR_EXPRESSION}")
Expand All @@ -606,7 +604,7 @@ FUNCTION(TRIBITS_PRIVATE_ADD_TEST_SET_PASSFAIL_PROPERTIES TEST_NAME_IN)
)
SET(CIR_REF_MSG "The following Teuchos::RCPNode objects were created")
# NOTE: The above string must be kept in sync with the C++ code!
IF (FAIL_REGEX_STR)
IF (FAIL_REGEX_STRINGS)
SET(FAIL_REGEX_STRINGS "${FAIL_REGEX_STRINGS};${CIR_REF_MSG}")
ELSE()
SET(FAIL_REGEX_STRINGS "${CIR_REF_MSG}")
Expand All @@ -622,7 +620,7 @@ ENDFUNCTION()


#
# Set the timeout for a test already aded
# Set the timeout for a test already added
#
FUNCTION(TRIBITS_PRIVATE_ADD_TEST_SET_TIMEOUT TEST_NAME_IN TIMEOUT_USED_OUT)

Expand Down
24 changes: 24 additions & 0 deletions packages/zoltan2/test/temp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST(
COMM mpi
)

TRIBITS_ADD_EXECUTABLE(
testfail
SOURCES testfail.cpp
COMM mpi serial
)

TRIBITS_ADD_TEST(
testfail
NAME testfail1
ARGS "FAIL"
WILL_FAIL
FAIL_REGULAR_EXPRESSION "FAIL;BUMMER"
COMM mpi serial
)

TRIBITS_ADD_TEST(
testfail
NAME testfail2
ARGS "BUMMER"
WILL_FAIL
FAIL_REGULAR_EXPRESSION "FAIL;BUMMER"
COMM mpi serial
)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
teuchosCommTest
SOURCES teuchosCommTest.cpp
Expand Down
10 changes: 10 additions & 0 deletions packages/zoltan2/test/temp/testfail.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <iostream>

int main(int narg, char **arg)
{
if (narg > 1)
std::cout << arg[1] << std::endl;
else
std::cout << "BUMMER" << std::endl;
return 0;
}

0 comments on commit c9f5e7b

Please sign in to comment.