kythe.io@v0.0.68-0.20240422202219-7225dbc01741/third_party/bazel/src/main/protobuf/test_status.proto (about) 1 // Copyright 2014 The Bazel Authors. All rights reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://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, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto2"; 16 17 package blaze; 18 19 option java_package = "com.google.devtools.build.lib.view.test"; 20 21 // Status data of test cases which failed (used only for printing test summary) 22 enum FailedTestCasesStatus { 23 /** Information about every test case is available. */ 24 FULL = 1; 25 /** Information about some test cases may be missing. */ 26 PARTIAL = 2; 27 /** No information about individual test cases. */ 28 NOT_AVAILABLE = 3; 29 /** This is an empty object still without data. */ 30 EMPTY = 4; 31 }; 32 33 // Detailed status data for a TestRunnerAction execution. 34 enum BlazeTestStatus { 35 NO_STATUS = 0; 36 PASSED = 1; 37 FLAKY = 2; 38 TIMEOUT = 3; 39 FAILED = 4; 40 INCOMPLETE = 5; 41 REMOTE_FAILURE = 6; 42 FAILED_TO_BUILD = 7; 43 BLAZE_HALTED_BEFORE_TESTING = 8; 44 }; 45 46 // TestCase contains detailed data about all tests (cases/suites/decorators) 47 // ran, structured in a tree. This data will be later used to present the tests 48 // by the web status server. 49 message TestCase { 50 enum Type { 51 TEST_CASE = 0; 52 TEST_SUITE = 1; 53 TEST_DECORATOR = 2; 54 UNKNOWN = 3; 55 } 56 57 enum Status { 58 PASSED = 0; 59 FAILED = 1; 60 ERROR = 2; 61 } 62 63 repeated TestCase child = 1; 64 optional string name = 2; 65 optional string class_name = 3; 66 optional int64 run_duration_millis = 4; 67 optional string result = 5; 68 optional Type type = 6; 69 optional Status status = 7; 70 optional bool run = 8 [default = true]; 71 }; 72 73 // TestResultData holds the outcome data for a single test action (A 74 // single test rule can result in multiple actions due to sharding and 75 // runs_per_test settings.) 76 message TestResultData { 77 // The following two fields are used for TestRunnerAction caching. 78 // This reflects the fact that failing tests are successful 79 // actions that might be cached, depending on option settings. 80 optional bool cachable = 1; 81 optional bool test_passed = 2; 82 83 // Following data is informational. 84 optional BlazeTestStatus status = 3 [default = NO_STATUS]; 85 optional string status_details = 16; 86 repeated string failed_logs = 4; 87 repeated string warning = 5; 88 optional bool has_coverage = 6; 89 90 // Returns if this was cached in remote execution. 91 optional bool remotely_cached = 7; 92 93 // Returns true if this was executed remotely 94 optional bool is_remote_strategy = 8; 95 96 // All associated test times (in ms). 97 repeated int64 test_times = 9; 98 99 // Passed log paths. Set if the test passed. 100 optional string passed_log = 10; 101 102 // Test times, without remote execution overhead (in ms). 103 repeated int64 test_process_times = 11; 104 105 // Total time in ms. 106 optional int64 run_duration_millis = 12; 107 108 // Start time of the test action in ms since the epoch. 109 optional int64 start_time_millis_epoch = 15; 110 111 // Additional build info 112 optional TestCase test_case = 13; 113 optional FailedTestCasesStatus failed_status = 14; 114 };