xref: /aosp_15_r20/external/pigweed/pw_target_runner/pw_target_runner_protos/target_runner.proto (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1// Copyright 2019 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14syntax = "proto3";
15
16package pw.target_runner;
17
18option go_package = "pigweed/proto/pw_target_runner/target_runner_pb";
19
20service TargetRunner {
21  // Queues a single executable, blocking until it has run.
22  rpc RunBinary(RunBinaryRequest) returns (RunBinaryResponse) {}
23
24  // Returns information about the server.
25  rpc Status(Empty) returns (ServerStatus) {}
26}
27
28message Empty {}
29
30enum RunStatus {
31  PENDING = 0;
32  SUCCESS = 1;
33  FAILURE = 2;
34  SKIPPED = 3;
35}
36
37message RunBinaryRequest {
38  oneof binary {
39    // Local file path to the binary.
40    string file_path = 1;
41    // The executable test file to run.
42    bytes test_binary = 2;
43  }
44}
45
46message RunBinaryResponse {
47  RunStatus result = 1;
48  uint64 queue_time_ns = 2;
49  uint64 run_time_ns = 3;
50  bytes output = 4;
51}
52
53message ServerStatus {
54  uint64 uptime_ns = 1;
55  uint32 tasks_queued = 2;
56  uint32 tasks_passed = 3;
57  uint32 tasks_failed = 4;
58}
59