1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16syntax = "proto3";
17
18package com.android.tradefed.isolation;
19
20option java_multiple_files = true;
21option java_package = "com.android.tradefed.isolation";
22option java_outer_classname = "IsolationRunnerProto";
23
24enum RunnerOp {
25  RUNNER_OP_UNSPECIFIED = 0;
26  RUNNER_OP_STOP = 1;
27  RUNNER_OP_RUN_TEST = 2;
28}
29
30enum RunnerStatus {
31  RUNNER_STATUS_UNSPECIFIED = 0;
32  RUNNER_STATUS_STARTING = 1;
33  RUNNER_STATUS_FINISHED_OK = 2;
34  RUNNER_STATUS_FINISHED_ERROR = 3;
35}
36
37enum TestStatus {
38  TEST_STATUS_UNSPECIFIED = 0;
39  TEST_STATUS_STARTED = 1;
40  TEST_STATUS_FINISHED_OK = 2;
41  TEST_STATUS_FINISHED_ERROR = 3;
42  TEST_STATUS_RUN_STARTED = 4;
43  TEST_STATUS_RUN_FINISHED = 5;
44}
45
46message TestParameters {
47  repeated string testClasses = 1;
48  repeated string testJarAbsPaths = 2;
49  repeated string excludePaths = 3;
50  FilterSpec filter = 4;
51  bool dryRun = 5;
52}
53
54message FilterSpec {
55  repeated string includeFilters = 1;
56  repeated string excludeFilters = 2;
57  repeated string includeAnnotations = 3;
58  repeated string excludeAnnotations = 4;
59}
60
61enum Topic {
62  TOPIC_UNSPECIFIED = 0;
63  TOPIC_FAILURE = 1;
64  TOPIC_ASSUMPTION_FAILURE = 2;
65  TOPIC_STARTED = 3;
66  TOPIC_FINISHED = 4;
67  TOPIC_IGNORED = 5;
68  TOPIC_RUN_STARTED = 6;
69  TOPIC_RUN_FINISHED = 7;
70  TOPIC_SUITE_STARTED = 8;
71  TOPIC_SUITE_FINISHED = 9;
72}
73
74message JUnitEvent {
75  Topic topic = 1;
76  string message = 2;
77  string method_name = 3;
78  string class_name = 4;
79  string suite_name = 5;
80  int32 test_count = 6;
81  int64 elapsed_time = 7;
82}
83
84message RunnerMessage {
85  RunnerOp command = 1;
86  TestParameters params = 2;
87}
88
89message RunnerReply {
90  RunnerStatus runnerStatus = 1;
91  JUnitEvent testEvent = 2;
92  string message = 3;
93}