Add targeted PPI payload automation
This commit is contained in:
@@ -20,6 +20,8 @@ execute_process(
|
||||
--frames 2
|
||||
--frame-duration-ms 321
|
||||
--include-test-face-payload
|
||||
--payload-layer 1
|
||||
--payload-frame 1
|
||||
RESULT_VARIABLE save_result
|
||||
OUTPUT_VARIABLE save_output
|
||||
ERROR_VARIABLE save_error)
|
||||
@@ -32,7 +34,14 @@ string(FIND "${save_output}" "\"command\":\"save-project\"" save_command_index)
|
||||
string(FIND "${save_output}" "\"layers\":2" save_layers_index)
|
||||
string(FIND "${save_output}" "\"frames\":2" save_frames_index)
|
||||
string(FIND "${save_output}" "\"facePayloads\":1" save_payload_index)
|
||||
if(save_command_index LESS 0 OR save_layers_index LESS 0 OR save_frames_index LESS 0 OR save_payload_index LESS 0)
|
||||
string(FIND "${save_output}" "\"payloadLayer\":1" save_payload_layer_index)
|
||||
string(FIND "${save_output}" "\"payloadFrame\":1" save_payload_frame_index)
|
||||
if(save_command_index LESS 0
|
||||
OR save_layers_index LESS 0
|
||||
OR save_frames_index LESS 0
|
||||
OR save_payload_index LESS 0
|
||||
OR save_payload_layer_index LESS 0
|
||||
OR save_payload_frame_index LESS 0)
|
||||
message(FATAL_ERROR "save-project payload output did not contain expected summary: ${save_output}")
|
||||
endif()
|
||||
|
||||
@@ -40,6 +49,21 @@ if(NOT EXISTS "${OUTPUT_PATH}")
|
||||
message(FATAL_ERROR "save-project did not create ${OUTPUT_PATH}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${PANO_CLI}" inspect-project --path "${OUTPUT_PATH}"
|
||||
RESULT_VARIABLE inspect_result
|
||||
OUTPUT_VARIABLE inspect_output
|
||||
ERROR_VARIABLE inspect_error)
|
||||
|
||||
if(NOT inspect_result EQUAL 0)
|
||||
message(FATAL_ERROR "inspect-project failed after payload save-project: ${inspect_output}${inspect_error}")
|
||||
endif()
|
||||
|
||||
string(REGEX MATCH "\"index\":1,\"storedOrder\":1,\"name\":\"Payload 2\".*\"index\":1,\"durationMs\":321,\"dirtyFaces\":\\[\\{\"face\":0" inspect_targeted_payload "${inspect_output}")
|
||||
if(NOT inspect_targeted_payload)
|
||||
message(FATAL_ERROR "inspect-project output did not show the payload on layer 1 frame 1: ${inspect_output}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${PANO_CLI}" load-project --path "${OUTPUT_PATH}"
|
||||
RESULT_VARIABLE load_result
|
||||
|
||||
Reference in New Issue
Block a user