pub struct Opts { /* private fields */ }Expand description
Tool to run tests that exercise the wit-bindgen bindings generator.
This tool is used to (a) generate bindings for a target language, (b) compile the bindings and source code to a wasm component, (c) compose a “runner” and a “test” component together, and (d) execute this component to ensure that it passes. This process is guided by filesystem structure which must adhere to some conventions.
-
Tests are located in any directory that contains a
test.witdescription of the WIT being tested. The<TEST>argument to this command is walked recursively to findtest.witfiles. -
The
test.witfile must have arunnerworld and atestworld. The “runner” should import interfaces that are exported by “test”. -
Adjacent to
test.witshould be a number ofrunner*.*files. There is one runner per source language, for examplerunner.rsandrunner.c. These are source files for therunnerworld. Source files can start with//@ ...comments to deserialize intoconfig::RuntimeTestConfig, currently that supports://@ args = ['--arguments', 'to', '--the', 'bindings', '--generator']or
//@ args = '--arguments to --the bindings --generator' -
Adjacent to
test.witshould also be a number oftest*.*files. Like runners there is one per source language. Note that you can have multiple implementations of tests in the same language too, for exampletest-foo.rsandtest-bar.rs. All tests must export the sametestworld fromtest.wit, however.
This tool will discover test.wit files, discover runners/tests, and then
compile everything and run the combinatorial matrix of runners against
tests. It’s expected that each runner.* and test.* perform the same
functionality and only differ in source language.
Implementations§
Trait Implementations§
Source§impl Args for Opts
impl Args for Opts
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Opts
impl CommandFactory for Opts
Source§impl FromArgMatches for Opts
impl FromArgMatches for Opts
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.