blob: b8ea5af5af2feee1b9d46a52dafc392114e67420 [file] [log] [blame]
// Copyright 2024 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.
@available(added=HEAD)
library fuchsia.diagnostics.test;
/// Allows a test framework to invoke a special test mode and control program
/// operations.
@discoverable(server="platform")
closed protocol DetectController {
/// Enter the test mode. Return when the program is ready and idle.
/// If already in test mode, it will not return until the first test mode is
/// exited by closing its test_controller client_end.
strict EnterTestMode(resource struct {
test_controller server_end:TestCaseController;
}) -> ();
};
/// Tell Detect when to run test cases. Close the protocol to exit test mode.
/// Running a test case (for example, with RunDefaultCycle() does not exit test
/// mode when the test case completes.
closed protocol TestCaseController {
/// Run a single default test case. Returns when the test case completes.
/// Returns an error if the test case exits abnormally.
strict RunDefaultCycle() -> ();
};