result_flow: add request/response proto for test_runner sub-command
BUG=chromium:1100999
TEST=./generate.sh
Change-Id: I2a73025c1021d148d99203bfac83b41df07e7c56
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2276179
Reviewed-by: Alex Zamorzaev <zamorzaev@chromium.org>
Commit-Queue: Xinan Lin <linxinan@chromium.org>
Tested-by: Xinan Lin <linxinan@chromium.org>
diff --git a/go/test_platform/result_flow/test_runner.pb.go b/go/test_platform/result_flow/test_runner.pb.go
new file mode 100644
index 0000000..20ca6ea
--- /dev/null
+++ b/go/test_platform/result_flow/test_runner.pb.go
@@ -0,0 +1,167 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: test_platform/result_flow/test_runner.proto
+
+package result_flow
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ timestamp "github.com/golang/protobuf/ptypes/timestamp"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+// TestRunnerRequest defines the input of `result_flow test_runner`.
+type TestRunnerRequest struct {
+ // The source config for fetching the test runner builds.
+ TestRunner *Source `protobuf:"bytes,1,opt,name=test_runner,json=testRunner,proto3" json:"test_runner,omitempty"`
+ // The target to upload test run results.
+ TestRun *Target `protobuf:"bytes,2,opt,name=test_run,json=testRun,proto3" json:"test_run,omitempty"`
+ // The target to upload test case results.
+ TestCase *Target `protobuf:"bytes,3,opt,name=test_case,json=testCase,proto3" json:"test_case,omitempty"`
+ // Hard deadline for execution.
+ //
+ // TestRunner command should abort beyond this deadline.
+ Deadline *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deadline,proto3" json:"deadline,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *TestRunnerRequest) Reset() { *m = TestRunnerRequest{} }
+func (m *TestRunnerRequest) String() string { return proto.CompactTextString(m) }
+func (*TestRunnerRequest) ProtoMessage() {}
+func (*TestRunnerRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_df9f4b468bf4599d, []int{0}
+}
+
+func (m *TestRunnerRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TestRunnerRequest.Unmarshal(m, b)
+}
+func (m *TestRunnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TestRunnerRequest.Marshal(b, m, deterministic)
+}
+func (m *TestRunnerRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TestRunnerRequest.Merge(m, src)
+}
+func (m *TestRunnerRequest) XXX_Size() int {
+ return xxx_messageInfo_TestRunnerRequest.Size(m)
+}
+func (m *TestRunnerRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_TestRunnerRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TestRunnerRequest proto.InternalMessageInfo
+
+func (m *TestRunnerRequest) GetTestRunner() *Source {
+ if m != nil {
+ return m.TestRunner
+ }
+ return nil
+}
+
+func (m *TestRunnerRequest) GetTestRun() *Target {
+ if m != nil {
+ return m.TestRun
+ }
+ return nil
+}
+
+func (m *TestRunnerRequest) GetTestCase() *Target {
+ if m != nil {
+ return m.TestCase
+ }
+ return nil
+}
+
+func (m *TestRunnerRequest) GetDeadline() *timestamp.Timestamp {
+ if m != nil {
+ return m.Deadline
+ }
+ return nil
+}
+
+// TestRunnerResponse defines the output of `result_flow test_runner`.
+type TestRunnerResponse struct {
+ // `result_flow test_runner` exits with exit code 0 unless there is an
+ // infrastructure failure. When the exit code is 0, `state` indicates the
+ // best known state of the test_runner command execution (see comments on State enum).
+ State State `protobuf:"varint,1,opt,name=state,proto3,enum=test_platform.result_flow.State" json:"state,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *TestRunnerResponse) Reset() { *m = TestRunnerResponse{} }
+func (m *TestRunnerResponse) String() string { return proto.CompactTextString(m) }
+func (*TestRunnerResponse) ProtoMessage() {}
+func (*TestRunnerResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_df9f4b468bf4599d, []int{1}
+}
+
+func (m *TestRunnerResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_TestRunnerResponse.Unmarshal(m, b)
+}
+func (m *TestRunnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_TestRunnerResponse.Marshal(b, m, deterministic)
+}
+func (m *TestRunnerResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TestRunnerResponse.Merge(m, src)
+}
+func (m *TestRunnerResponse) XXX_Size() int {
+ return xxx_messageInfo_TestRunnerResponse.Size(m)
+}
+func (m *TestRunnerResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_TestRunnerResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TestRunnerResponse proto.InternalMessageInfo
+
+func (m *TestRunnerResponse) GetState() State {
+ if m != nil {
+ return m.State
+ }
+ return State_STATE_UNSPECIFIED
+}
+
+func init() {
+ proto.RegisterType((*TestRunnerRequest)(nil), "test_platform.result_flow.TestRunnerRequest")
+ proto.RegisterType((*TestRunnerResponse)(nil), "test_platform.result_flow.TestRunnerResponse")
+}
+
+func init() {
+ proto.RegisterFile("test_platform/result_flow/test_runner.proto", fileDescriptor_df9f4b468bf4599d)
+}
+
+var fileDescriptor_df9f4b468bf4599d = []byte{
+ // 289 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0x33, 0x31,
+ 0x10, 0x86, 0x69, 0xbf, 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0x3b, 0xd0, 0xbb, 0xba, 0x72, 0x90, 0xfd, 0x4f, 0xe3,
+ 0x33, 0xd1, 0x66, 0x21, 0xba, 0x2c, 0x44, 0xde, 0x65, 0xa1, 0xf6, 0xec, 0xe2, 0x91, 0xf1, 0x7e,
+ 0x1c, 0xa1, 0x41, 0x97, 0x6c, 0x07, 0x81, 0x34, 0x41, 0x4a, 0xe2, 0x64, 0x39, 0xff, 0x29, 0x89,
+ 0x4f, 0x4e, 0xb5, 0xf8, 0xea, 0xe1, 0x79, 0x6d, 0x50, 0x14, 0x2f, 0x1e, 0x6d, 0x15, 0xad, 0x40,
+ 0x6f, 0x64, 0x57, 0x60, 0x90, 0x95, 0x2b, 0xbd, 0x6e, 0x5f, 0x23, 0x0d, 0xca, 0xc1, 0x97, 0x6e,
+ 0x0f, 0x13, 0x73, 0xf3, 0x11, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xe5, 0x91, 0xae, 0x3e, 0x02, 0x00,
+ 0x00,
+}
diff --git a/src/test_platform/result_flow/test_runner.proto b/src/test_platform/result_flow/test_runner.proto
new file mode 100644
index 0000000..c612f43
--- /dev/null
+++ b/src/test_platform/result_flow/test_runner.proto
@@ -0,0 +1,34 @@
+// Copyright 2020 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto3";
+
+package test_platform.result_flow;
+
+option go_package = "go.chromium.org/chromiumos/infra/proto/go/test_platform/result_flow";
+
+import "test_platform/result_flow/common.proto";
+import "google/protobuf/timestamp.proto";
+
+// TestRunnerRequest defines the input of `result_flow test_runner`.
+message TestRunnerRequest {
+ // The source config for fetching the test runner builds.
+ Source test_runner = 1;
+ // The target to upload test run results.
+ Target test_run = 2;
+ // The target to upload test case results.
+ Target test_case = 3;
+ // Hard deadline for execution.
+ //
+ // TestRunner command should abort beyond this deadline.
+ google.protobuf.Timestamp deadline = 4;
+}
+
+// TestRunnerResponse defines the output of `result_flow test_runner`.
+message TestRunnerResponse {
+ // `result_flow test_runner` exits with exit code 0 unless there is an
+ // infrastructure failure. When the exit code is 0, `state` indicates the
+ // best known state of the test_runner command execution (see comments on State enum).
+ State state = 1;
+}
\ No newline at end of file