Skip to content

Commit 318ef5a

Browse files
committed
renamed runner to wrapper
1 parent abb7be8 commit 318ef5a

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

extensions/wasm_bindgen/private/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ bzl_library(
1515
)
1616

1717
rust_binary(
18-
name = "wasm_bindgen_test_runner",
19-
srcs = ["wasm_bindgen_test_runner.rs"],
18+
name = "wasm_bindgen_test_wrapper",
19+
srcs = ["wasm_bindgen_test_wrapper.rs"],
2020
edition = "2021",
2121
visibility = ["//visibility:public"],
2222
deps = [

extensions/wasm_bindgen/private/wasm_bindgen_test.bzl

+7-10
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,13 @@ def _rust_wasm_bindgen_test_impl(ctx):
154154
{},
155155
)
156156

157-
# if ctx.configuration.coverage_enabled:
158-
# env.update(get_coverage_env(toolchain))
159-
160157
components = "{}/{}".format(ctx.label.workspace_root, ctx.label.package).split("/")
161158
env["CARGO_MANIFEST_DIR"] = "/".join([c for c in components if c])
162159

163-
runner = ctx.actions.declare_file(ctx.label.name)
160+
wrapper = ctx.actions.declare_file(ctx.label.name)
164161
ctx.actions.symlink(
165-
output = runner,
166-
target_file = ctx.executable._runner,
162+
output = wrapper,
163+
target_file = ctx.executable._process_wrapper,
167164
is_executable = True,
168165
)
169166

@@ -191,7 +188,7 @@ def _rust_wasm_bindgen_test_impl(ctx):
191188
providers.append(DefaultInfo(
192189
files = prov.files,
193190
runfiles = prov.default_runfiles.merge(ctx.runfiles(files = [wasm_file], transitive_files = wb_toolchain.all_test_files)),
194-
executable = runner,
191+
executable = wrapper,
195192
))
196193
else:
197194
providers.append(prov)
@@ -326,11 +323,11 @@ rust_wasm_bindgen_test = rule(
326323
providers = [RustWasmBindgenInfo],
327324
mandatory = True,
328325
),
329-
"_runner": attr.label(
330-
doc = "TODO",
326+
"_process_wrapper": attr.label(
327+
doc = "The process wrapper for wasm-bindgen-test-runner.",
331328
cfg = "exec",
332329
executable = True,
333-
default = Label("//private:wasm_bindgen_test_runner"),
330+
default = Label("//private:wasm_bindgen_test_wrapper"),
334331
),
335332
} | RUSTC_ATTRS,
336333
fragments = ["cpp"],

extensions/wasm_bindgen/private/wasm_bindgen_test_runner.rs renamed to extensions/wasm_bindgen/private/wasm_bindgen_test_wrapper.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! wasm-bindgen test runner
1+
//! A Bazel wrapper for the wasm-bindgen-test-runner binary.
22
33
use std::collections::BTreeMap;
44
use std::env;

0 commit comments

Comments
 (0)