mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-14 07:08:32 +09:00
[Fix] (trace-replay): validate OpenRA on both backends
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
foreach(required TRACE_REPLAY_EXE MOBILEGL_LIBRARY OPENRA_TRACE_ARCHIVE OPENRA_GOLDEN OPENRA_OUTPUT_DIR)
|
||||
foreach(required TRACE_REPLAY_EXE MOBILEGL_LIBRARY OPENRA_TRACE_ARCHIVE OPENRA_GOLDEN OPENRA_OUTPUT_DIR OPENRA_BACKEND)
|
||||
if(NOT DEFINED ${required} OR "${${required}}" STREQUAL "")
|
||||
message(FATAL_ERROR "${required} is required")
|
||||
endif()
|
||||
@@ -32,7 +32,7 @@ execute_process(
|
||||
--trace "${openra_trace}"
|
||||
--golden "${OPENRA_GOLDEN}"
|
||||
--output "${OPENRA_OUTPUT_DIR}/output"
|
||||
--backend DirectGLES
|
||||
--backend "${OPENRA_BACKEND}"
|
||||
--mobilegl-library "${MOBILEGL_LIBRARY}"
|
||||
--target-call 31249
|
||||
--width 640
|
||||
@@ -58,6 +58,28 @@ else()
|
||||
message(FATAL_ERROR "trace replay did not write ${result_json}")
|
||||
endif()
|
||||
|
||||
set(retrace_log "${OPENRA_OUTPUT_DIR}/output/retrace.log")
|
||||
if(EXISTS "${retrace_log}")
|
||||
file(STRINGS "${retrace_log}" gl_identity_lines REGEX "MOBILEGL_TRACE_GL_")
|
||||
foreach(line IN LISTS gl_identity_lines)
|
||||
message(STATUS "${line}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(DEFINED OPENRA_ARTIFACT_DIR AND NOT "${OPENRA_ARTIFACT_DIR}" STREQUAL "")
|
||||
file(MAKE_DIRECTORY "${OPENRA_ARTIFACT_DIR}")
|
||||
set(actual_png "${OPENRA_OUTPUT_DIR}/output/actual.png")
|
||||
if(EXISTS "${actual_png}")
|
||||
file(COPY_FILE "${actual_png}" "${OPENRA_ARTIFACT_DIR}/openra-${OPENRA_BACKEND}-actual.png")
|
||||
endif()
|
||||
if(EXISTS "${result_json}")
|
||||
file(COPY_FILE "${result_json}" "${OPENRA_ARTIFACT_DIR}/openra-${OPENRA_BACKEND}-result.json")
|
||||
endif()
|
||||
if(EXISTS "${retrace_log}")
|
||||
file(COPY_FILE "${retrace_log}" "${OPENRA_ARTIFACT_DIR}/openra-${OPENRA_BACKEND}-retrace.log")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT replay_result EQUAL 0)
|
||||
message(FATAL_ERROR "OpenRA trace replay failed with status ${replay_result}")
|
||||
message(FATAL_ERROR "OpenRA ${OPENRA_BACKEND} trace replay failed with status ${replay_result}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user