| // Copyright 2019 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.test.manager; |
| |
| using fuchsia.url; |
| using fuchsia.test; |
| |
| /// Options to run particular test suite. |
| /// Reserved for future |
| table LaunchOptions { |
| }; |
| |
| /// Error for `LaunchSuite` call. |
| enum LaunchError { |
| /// There were insufficient resources to perform the operation. |
| RESOURCE_UNAVAILABLE = 1; |
| |
| /// Cannot resolve `test_url`. |
| INSTANCE_CANNOT_RESOLVE = 2; |
| |
| /// Invalid argument(s) passed. |
| INVALID_ARGS = 3; |
| |
| /// Some internal error occured. Something wrong with test manager setup. Check logs and report bug. |
| INTERNAL_ERROR = 4; |
| }; |
| |
| /// Controller for running suite. Suite would be destroyed when client end of this protocol is closed. |
| protocol SuiteController { |
| /// Destroys running suite. |
| Kill(); |
| }; |
| |
| /// Launches a test that implements the `fuchsia.test.Suite` protocol |
| /// (either directly or via a runner adapter). The test must be a |
| /// v2 component test. |
| /// |
| /// Designed to be used by run_test_suite to execute v2 tests. |
| /// |
| /// If test suite doesn't expose `fuchsia.test.Suite` protocol, this |
| /// call will suceed but call on suite protocol will fail with `PEER_CLOSED` error. |
| [Discoverable] |
| protocol Harness { |
| LaunchSuite(fuchsia.url.Url test_url, LaunchOptions options, |
| request<fuchsia.test.Suite> suite, request<SuiteController> controller) -> () |
| error LaunchError; |
| }; |