Implement recording functionality in agent test commands
- Added RecordingState structure to manage recording session details. - Implemented SaveRecordingState and LoadRecordingState functions to handle recording state persistence. - Enhanced HandleTestRecordCommand to support starting and stopping recording sessions with various options. - Integrated gRPC calls for starting and stopping recordings in GuiAutomationClient. - Updated ProposalRegistry to include sandbox directory and ROM path in ProposalMetadata. - Implemented JSON parsing for Tile16Proposal to handle proposal creation from JSON input. - Updated CMakeLists.txt to ensure proper linking of emulator targets.
This commit is contained in:
@@ -134,6 +134,21 @@ struct ReplayTestResult {
|
||||
std::vector<std::string> logs;
|
||||
};
|
||||
|
||||
struct StartRecordingResult {
|
||||
bool success = false;
|
||||
std::string message;
|
||||
std::string recording_id;
|
||||
std::optional<absl::Time> started_at;
|
||||
};
|
||||
|
||||
struct StopRecordingResult {
|
||||
bool success = false;
|
||||
std::string message;
|
||||
std::string output_path;
|
||||
int step_count = 0;
|
||||
std::chrono::milliseconds duration{0};
|
||||
};
|
||||
|
||||
enum class WidgetTypeFilter {
|
||||
kUnspecified,
|
||||
kAll,
|
||||
@@ -303,6 +318,15 @@ class GuiAutomationClient {
|
||||
const std::string& script_path, bool ci_mode,
|
||||
const std::map<std::string, std::string>& parameter_overrides = {});
|
||||
|
||||
absl::StatusOr<StartRecordingResult> StartRecording(
|
||||
const std::string& output_path,
|
||||
const std::string& session_name,
|
||||
const std::string& description);
|
||||
|
||||
absl::StatusOr<StopRecordingResult> StopRecording(
|
||||
const std::string& recording_id,
|
||||
bool discard = false);
|
||||
|
||||
/**
|
||||
* @brief Check if client is connected
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user