mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Codechange: Detect crashes during regression (#14774)
This commit is contained in:
@@ -25,6 +25,10 @@ if(EDITBIN_EXECUTABLE)
|
||||
execute_process(COMMAND ${EDITBIN_EXECUTABLE} /nologo /subsystem:console ${OPENTTD_EXECUTABLE})
|
||||
endif()
|
||||
|
||||
# Remove previous crash files
|
||||
file(GLOB CRASH_FILES "regression/crash*")
|
||||
file(REMOVE ${CRASH_FILES})
|
||||
|
||||
# Run the regression test
|
||||
execute_process(COMMAND ${OPENTTD_EXECUTABLE}
|
||||
-x
|
||||
@@ -40,6 +44,13 @@ execute_process(COMMAND ${OPENTTD_EXECUTABLE}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Detect any crash
|
||||
file(GLOB CRASH_FILES "regression/crash*.log")
|
||||
if (CRASH_FILES)
|
||||
file(READ ${CRASH_FILES} CRASH_LOG)
|
||||
message(FATAL_ERROR "OpenTTD crashed: ${CRASH_LOG}")
|
||||
endif()
|
||||
|
||||
if(REGRESSION_OUTPUT)
|
||||
message(FATAL_ERROR "Unexpected output: ${REGRESSION_OUTPUT}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user