You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/src/wasm-bindgen-test/coverage.md
+11-20
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,7 @@ You can ask the runner to generate coverage data from functions marked as `#[was
9
9
10
10
## Enabling the feature
11
11
12
-
To enable this feature, you need to set `cfg(wasm_bindgen_unstable_test_coverage)` for `wasm-bindgen-test` and its dependencies.
13
-
14
-
Currently it is particularly difficult to [deliver compile-line arguments to proc-macros when cross-compiling with Cargo][1]. To circumvent this [host-config] can be used.
To enable this feature, you need to enable `cfg(wasm_bindgen_unstable_test_coverage)`.
18
13
19
14
## Generating the data
20
15
@@ -26,18 +21,18 @@ Due to the current limitation of `llvm-cov`, we can't collect profiling symbols
26
21
27
22
### Arguments to the test runner
28
23
29
-
The following environment variables can be used to control the coverage output when [executing the test runner][2]:
24
+
The following environment variables can be used to control the coverage output when [executing the test runner][1]:
30
25
31
-
-`WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_OUT` to control the file name of the profraw or the directory in which it is placed
26
+
-`WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_OUT` to control the file name of the profraw or the directory in which it is placed. It might be necessary to provide the full path if e.g. running tests in a workspace.
32
27
-`WASM_BINDGEN_UNSTABLE_TEST_PROFRAW_PREFIX` to add a custom prefix to the profraw files. This can be useful if you're running the tests automatically in succession.
This feature relies on the [minicov] crate, which provides a profiling runtime for WebAssembly. It in turn uses [cc] to compile the runtime to Wasm, which [currently doesn't support accounting for target feature][3]. Use e.g. `CFLAGS_wasm32_unknown_unknown="-matomics -mbulk-memory"` to account for that.
33
+
This feature relies on the [minicov] crate, which provides a profiling runtime for WebAssembly. It in turn uses [cc] to compile the runtime to Wasm, which [currently doesn't support accounting for target feature][2]. Use e.g. `CFLAGS_wasm32_unknown_unknown="-matomics -mbulk-memory"` to account for that.
0 commit comments