crosvm/protos/tests/trunks.rs
David Tolnay 65928af6c9 protos: Merge plugin_proto crate under protos::plugin
This de-duplicates the two separate build.rs files dealing with proto
compilation. The trunks interface.proto will be exposed under
protos::trunks and the plugin proto will be exposed under protos::plugin.

BUG=none
TEST=cargo check
TEST=cargo check --features tpm
TEST=cargo check --features plugin
TEST=cargo check --features tpm,plugin
TEST=FEATURES=test emerge-nami crosvm
TEST=FEATURES=test USE=crosvm-tpm emerge-nami crosvm
TEST=FEATURES=test USE=crosvm-plugin emerge-nami crosvm
TEST=FEATURES=test USE='crosvm-tpm crosvm-plugin' emerge-nami crosvm
TEST=local kokoro
CQ-DEPEND=CL:1553971

Change-Id: I203b654a38e9d671a508156ae06dfb6f70047c4f
Reviewed-on: https://chromium-review.googlesource.com/1556417
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2019-04-12 14:49:57 -07:00

25 lines
636 B
Rust

// Copyright 2019 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.
#![cfg(feature = "trunks")]
mod common;
use crate::common::test_round_trip;
use protos::trunks::{SendCommandRequest, SendCommandResponse};
#[test]
fn send_command_request() {
let mut request = SendCommandRequest::new();
request.set_command(b"...".to_vec());
test_round_trip(request);
}
#[test]
fn send_command_response() {
let mut response = SendCommandResponse::new();
response.set_response(b"...".to_vec());
test_round_trip(response);
}