Skip to content

Commit

Permalink
Make ALWAYS_FAIL_ON_NONZERO_RETURN print right pass/fail (#150)
Browse files Browse the repository at this point in the history
It was doing the correct test case pass/fail but was not printing the right
pass/fail for this check.  Now it does.

I did not add a unit test for this since I think this is a more minor issue
(and I am not sure how to test it).

Build/Test Cases Summary
Enabled Packages:
Enabled all Packages
0) MPI_DEBUG => passed: passed=215,notpassed=0 (0.47 min)
1) SERIAL_RELEASE => passed: passed=215,notpassed=0 (0.43 min)
  • Loading branch information
bartlettroscoe committed Oct 29, 2016
1 parent 78f7220 commit 13d0557
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tribits/core/utils/DriveAdvancedTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,14 @@ FUNCTION(DRIVE_ADVANCED_TEST)
# C) Check for return code always 0?
IF (TEST_${CMND_IDX}_ALWAYS_FAIL_ON_NONZERO_RETURN)
IF (NOT EXEC_RESULT EQUAL 0)
SET(ALWAYS_FAIL_ON_NONZERO_RETURN_RESULT PASSED)
SET(TEST_CASE_PASSED FALSE)
ELSE()
SET(ALWAYS_FAIL_ON_NONZERO_RETURN_RESULT FAILED)
ENDIF()
PRINT_SINGLE_CHECK_RESULT(
"TEST_${CMND_IDX}: Pass criteria = ALWAYS_FAIL_ON_NONZERO_RETURN"
${TEST_CASE_PASSED} )
${ALWAYS_FAIL_ON_NONZERO_RETURN_RESULT} )
ENDIF()

# D) Invert pass/fail result?
Expand Down

0 comments on commit 13d0557

Please sign in to comment.