github.com/nya3jp/tast@v0.0.0-20230601000426-85c8e4d83a9b/src/go.chromium.org/tast/core/internal/protocol/handshake.proto (about) 1 // Copyright 2020 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 syntax = "proto3"; 6 7 package tast.core; 8 option go_package = "go.chromium.org/tast/core/internal/protocol"; 9 10 // HandshakeRequest contains parameters needed to initialize a gRPC server. 11 // The message is sent in a raw format since gRPC connection is not ready before 12 // handshake. 13 message HandshakeRequest { 14 // Whether to initialize user-defined gRPC services. 15 bool need_user_services = 1; 16 BundleInitParams bundle_init_params = 2; 17 RunnerInitParams runner_init_params = 3; 18 } 19 20 // HandshakeResponse is a response to an HandshakeRequest message. 21 // The message is sent in a raw format since gRPC connection is not ready before 22 // handshake. 23 message HandshakeResponse { 24 // Set if an error occurred. 25 HandshakeError error = 1; 26 } 27 28 // HandshakeError describes a failed handshake result. 29 message HandshakeError { string reason = 1; } 30 31 // BundleInitParams contains parameters needed to initialize bundles. 32 message BundleInitParams { 33 // Runtime variables. 34 map<string, string> vars = 1; 35 36 // BundleConfigs represents all the bundles to run. 37 BundleConfig bundle_config = 2; 38 } 39 40 // RunnerInitParams contains information needed to initialize test runners. 41 message RunnerInitParams { 42 // A file path glob that matches test bundle executables. 43 // Example: "/usr/local/libexec/tast/bundles/local/*" 44 string bundle_glob = 1; 45 } 46 47 message BundleConfig { 48 // PrimaryTarget is the target device for remote tests. 49 TargetDevice primary_target = 1; 50 map<string, DUTConfig> companion_duts = 2; 51 MetaTestConfig meta_test_config = 3; 52 } 53 54 // TargetDevice represents a local bundle on which remote tests invoke services. 55 message TargetDevice { 56 // DutConfig describes the DUT containing local bundles. 57 DUTConfig dut_config = 1; 58 // BundleDir represents the directory on which the target bundle exists. 59 string bundle_dir = 2; 60 } 61 62 // DUTConfig describes a DUT. 63 message DUTConfig { 64 // SshConfig contains information needed to connect to the DUT via SSH. 65 SSHConfig ssh_config = 1; 66 // TlwName contains the name of the DUT recognized by the TLW service. 67 // This must be set when TLW API is used. 68 string tlw_name = 2; 69 } 70 71 // SSHConfig contains information needed to connect to the DUT via SSH. 72 message SSHConfig { 73 // ConnectionSpec is a connection spec as [<user>@]host[:<port>]. 74 string connection_spec = 1; 75 // KeyFile is a path to the SSH private key to use to connect to the target. 76 string key_file = 2; 77 // KeyDir is a path to the directory containing SSH private keys 78 // (typically $HOME/.ssh). 79 string key_dir = 3; 80 // ProxyCommand specifies the command to use to connect to the DUT. 81 string proxy_command = 4; 82 } 83 84 // MetaTestConfig contains parameters needed by meta tests (tests that 85 // exercise Tast itself). 86 message MetaTestConfig { 87 // TastPath contains the path to the tast binary that was executed to initiate 88 // testing. 89 string tast_path = 1; 90 // RunFlags contains a subset of the flags that were passed to the "tast run" 91 // command. The included flags are ones that are necessary for core 92 // functionality, e.g. paths to binaries used by the tast process and 93 // credentials for reconnecting to the DUT. 94 repeated string run_flags = 2; 95 // ListFlags contains a subset of the flags that were passed to the "tast 96 // list" command. The included flags are ones that are necessary for core 97 // functionality, e.g. paths to binaries used by the tast process and 98 // credentials for reconnecting to the DUT. 99 repeated string list_flags = 3; 100 }