Skip to content

Commit aca7d7e

Browse files
committed
Detect cmake test result.
1 parent 94b1252 commit aca7d7e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ endforeach()
1616
# $1 exec, $2 input, $3 output_result
1717
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_helper.sh
1818
"rm -f $3\n"
19-
"$1 < $2"
19+
"$1 < $2\n"
20+
"grep -q FATAL $3\n"
21+
"if [ $? -eq 0 ]; then\n"
22+
"echo Error\n"
23+
"exit 1\n"
24+
"else\n"
25+
"exit 0\n"
26+
"fi\n"
2027
)
2128

2229
set(float_types s d c z)

0 commit comments

Comments
 (0)