Plan recording worker wake decisions
This commit is contained in:
@@ -934,7 +934,7 @@ if(TARGET pano_cli)
|
||||
COMMAND pano_cli plan-recording-session --running --frame-count 12)
|
||||
set_tests_properties(pano_cli_plan_recording_session_running_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-recording-session\".*\"running\":true.*\"startDecision\":\"no-op-already-running\".*\"stopDecision\":\"stop-thread\".*\"stopRunningRecording\":true.*\"progressTotal\":12")
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-recording-session\".*\"running\":true.*\"startDecision\":\"no-op-already-running\".*\"stopDecision\":\"stop-thread\".*\"stopRunningRecording\":true.*\"progressTotal\":12.*\"worker\":\\{\"continueRunning\":true,\"encodeFrame\":true,\"clearDirtyStroke\":true,\"updateFrameLabel\":true\\}")
|
||||
|
||||
add_test(NAME pano_cli_plan_recording_session_platform_cleanup_smoke
|
||||
COMMAND pano_cli plan-recording-session --platform-deletes-recorded-files)
|
||||
@@ -942,6 +942,12 @@ if(TARGET pano_cli)
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-recording-session\".*\"platformDeletesRecordedFiles\":true.*\"deleteRecordedFiles\":true.*\"frameCountAfterClear\":0")
|
||||
|
||||
add_test(NAME pano_cli_plan_recording_session_missing_encoder_smoke
|
||||
COMMAND pano_cli plan-recording-session --running --no-encoder)
|
||||
set_tests_properties(pano_cli_plan_recording_session_missing_encoder_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast;fuzz"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-recording-session\".*\"running\":true.*\"encoderAvailable\":false.*\"worker\":\\{\"continueRunning\":true,\"encodeFrame\":false,\"clearDirtyStroke\":false,\"updateFrameLabel\":false\\}")
|
||||
|
||||
add_test(NAME pano_cli_plan_app_preferences_smoke
|
||||
COMMAND pano_cli plan-app-preferences
|
||||
--ui-scale 1.5
|
||||
|
||||
@@ -119,6 +119,25 @@ void recording_export_clamps_progress_total(pp::tests::Harness& harness)
|
||||
PP_EXPECT(harness, plan.progress_total == std::numeric_limits<int>::max());
|
||||
}
|
||||
|
||||
void recording_worker_iteration_encodes_only_when_ready(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto encode = pp::app::plan_recording_worker_iteration(true, true, true);
|
||||
const auto stopped = pp::app::plan_recording_worker_iteration(false, true, true);
|
||||
const auto missing_encoder = pp::app::plan_recording_worker_iteration(true, false, true);
|
||||
const auto missing_canvas = pp::app::plan_recording_worker_iteration(true, true, false);
|
||||
|
||||
PP_EXPECT(harness, encode.continue_running);
|
||||
PP_EXPECT(harness, encode.encode_frame);
|
||||
PP_EXPECT(harness, encode.clear_dirty_stroke);
|
||||
PP_EXPECT(harness, encode.update_frame_label);
|
||||
PP_EXPECT(harness, !stopped.continue_running);
|
||||
PP_EXPECT(harness, !stopped.encode_frame);
|
||||
PP_EXPECT(harness, missing_encoder.continue_running);
|
||||
PP_EXPECT(harness, !missing_encoder.encode_frame);
|
||||
PP_EXPECT(harness, missing_canvas.continue_running);
|
||||
PP_EXPECT(harness, !missing_canvas.encode_frame);
|
||||
}
|
||||
|
||||
void executor_dispatches_recording_lifecycle(pp::tests::Harness& harness)
|
||||
{
|
||||
FakeRecordingServices services;
|
||||
@@ -180,6 +199,7 @@ int main()
|
||||
recording_clear_resets_frames_and_preserves_platform_delete_flag);
|
||||
harness.run("recording export tracks frame count", recording_export_tracks_frame_count);
|
||||
harness.run("recording export clamps progress total", recording_export_clamps_progress_total);
|
||||
harness.run("recording worker iteration encodes only when ready", recording_worker_iteration_encodes_only_when_ready);
|
||||
harness.run("executor dispatches recording lifecycle", executor_dispatches_recording_lifecycle);
|
||||
harness.run("executor dispatches recording clear and export", executor_dispatches_recording_clear_and_export);
|
||||
return harness.finish();
|
||||
|
||||
Reference in New Issue
Block a user