Skip to content

Commit d6dc4c0

Browse files
[UR][Tests] print test command and full path to output, when CTS fails
1 parent fedcee6 commit d6dc4c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmake/match.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ elseif(${MODE} STREQUAL "file")
6161
endif()
6262

6363
if(TEST_RESULT)
64-
message(FATAL_ERROR "Failed: Test ${TEST_FILE} ${TEST_ARGS} returned non-zero (${TEST_RESULT}).")
64+
message(FATAL_ERROR "Failed: Test command '${TEST_FILE} ${TEST_ARGS}' returned non-zero (${TEST_RESULT}).")
6565
endif()
6666

6767
# Compare the output file contents with a match file contents
@@ -71,9 +71,9 @@ execute_process(
7171
)
7272

7373
if(TEST_RESULT)
74-
message(FATAL_ERROR "Failed (${TEST_RESULT}): The output of ${OUT_FILE} does not match ${MATCH_FILE}")
75-
elseif()
76-
message("Passed: The output ${OUT_FILE} matches ${MATCH_FILE}")
74+
message(FATAL_ERROR "Failed (${TEST_RESULT}): The output of test command '${TEST_FILE} ${TEST_ARGS}' (stored in ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE}) does not match '${MATCH_FILE}'")
75+
else()
76+
message("Passed: The output of test command '${TEST_FILE} ${TEST_ARGS}' (stored in ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE}) matches '${MATCH_FILE}'")
7777
endif()
7878

7979
if(EXISTS ${OUT_FILE})

0 commit comments

Comments
 (0)