blob: ad4bb5e4582c857f01534fe4125d6048ec27d0ee [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.hardware.test;
using zx;
struct TestReport {
uint32 n_tests;
uint32 n_success;
uint32 n_failed;
};
[Transport = "Banjo", BanjoLayout = "ddk-callback"]
protocol TestFunc {
Callback() -> (zx.status s, TestReport report);
};
[Transport = "Banjo", BanjoLayout = "ddk-protocol"]
protocol Test {
/// Sets test output socket.
SetOutputSocket(zx.handle:SOCKET handle) -> ();
/// Gets test output socket.
GetOutputSocket() -> (zx.handle:SOCKET h);
/// Gets test channel. This has per-test meaning.
GetChannel() -> (zx.handle:CHANNEL h);
/// Sets test function.
SetTestFunc(TestFunc func) -> ();
/// Run tests, calls the function set in |SetTestFunc|.
RunTests() -> (zx.status s, TestReport report);
/// Calls `device_remove()`.
Destroy() -> ();
};