| // Copyright 2022 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.runner; | |
| using fuchsia.io; | |
| using fuchsia.ldsvc; | |
| /// Caches lib loader requests in memory. | |
| closed protocol LibraryLoaderCache { | |
| /// Serve the cache over provided handle. | |
| strict Serve(resource struct { | |
| loader server_end:fuchsia.ldsvc.Loader; | |
| }); | |
| }; | |
| /// Provides an API to create LibraryLoaderCache. This is used by test runners | |
| /// to make test execution faster when launching same process in a package | |
| /// multiple times. | |
| @discoverable | |
| closed protocol LibraryLoaderCacheBuilder { | |
| /// Create a new LibraryLoaderCache backed by `lib_directory`. | |
| /// `lib_directory`: Handle to /pkg/lib of the component which needs | |
| /// to be launched. | |
| /// `cache`: The handle which will serve |LibraryLoaderCache|. | |
| strict Create(resource struct { | |
| lib_directory client_end:fuchsia.io.Directory; | |
| cache server_end:LibraryLoaderCache; | |
| }); | |
| }; |