1syntax = "proto2";
2
3import "proto/common.proto";
4
5option java_package = "com.android.asuite.clearcut";
6
7// Proto used by Atest CLI Tool for internal Users
8message AtestLogEventInternal {
9
10  // ------------------------
11  // EVENT DEFINITIONS
12  // ------------------------
13  // Occurs immediately upon execution of atest
14  message AtestStartEvent {
15    optional string command_line = 1;
16    repeated string test_references = 2;
17    optional string cwd = 3;
18    optional string os = 4;
19  }
20
21  // Occurs when atest exits for any reason
22  message AtestExitEvent {
23    optional Duration duration = 1;
24    optional int32 exit_code = 2;
25    optional string stacktrace = 3;
26    optional string logs = 4;
27  }
28
29  // Occurs after a SINGLE test reference has been resolved to a test or
30  // not found
31  message FindTestFinishEvent {
32    optional Duration duration = 1;
33    optional bool success = 2;
34    optional string test_reference = 3;
35    repeated string test_finders = 4;
36    optional string test_info = 5;
37  }
38
39  // Occurs after the build finishes, either successfully or not.
40  message BuildFinishEvent {
41    optional Duration duration = 1;
42    optional bool success = 2;
43    repeated string targets = 3;
44  }
45
46  // Occurs when a single test runner has completed
47  message RunnerFinishEvent {
48    optional Duration duration = 1;
49    optional bool success = 2;
50    optional string runner_name = 3;
51    message Test {
52      optional string name = 1;
53      optional int32 result = 2;
54      optional string stacktrace = 3;
55    }
56    repeated Test test = 4;
57  }
58
59  // Occurs after all test runners and tests have finished
60  message RunTestsFinishEvent {
61    optional Duration duration = 1;
62  }
63
64  // Occurs after detection of catching bug by atest have finished
65  message LocalDetectEvent {
66    optional int32 detect_type = 1;
67    optional int32 result = 2;
68  }
69
70  // ------------------------
71  // FIELDS FOR ATESTLOGEVENT
72  // ------------------------
73  optional string user_key = 1;
74  optional string run_id = 2;
75  optional UserType user_type = 3;
76  optional string tool_name = 10;
77  oneof event {
78    AtestStartEvent atest_start_event = 4;
79    AtestExitEvent atest_exit_event = 5;
80    FindTestFinishEvent find_test_finish_event= 6;
81    BuildFinishEvent build_finish_event = 7;
82    RunnerFinishEvent runner_finish_event = 8;
83    RunTestsFinishEvent run_tests_finish_event = 9;
84    LocalDetectEvent local_detect_event = 11;
85  }
86}
87