xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/bazel_env/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifan"Tests for upstream wrappers."
2*d4726bddSHONG Yifan
3*d4726bddSHONG Yifansh_test(
4*d4726bddSHONG Yifan    name = "upstream_cargo_test",
5*d4726bddSHONG Yifan    size = "small",
6*d4726bddSHONG Yifan    srcs = ["cargo_test.sh"],
7*d4726bddSHONG Yifan    args = [
8*d4726bddSHONG Yifan        "$(rlocationpath @rules_rust//tools/upstream_wrapper:cargo)",
9*d4726bddSHONG Yifan    ],
10*d4726bddSHONG Yifan    data = [
11*d4726bddSHONG Yifan        "Cargo.lock",
12*d4726bddSHONG Yifan        "Cargo.toml",
13*d4726bddSHONG Yifan        "//rust/hello_world:Cargo.toml",
14*d4726bddSHONG Yifan        "//rust/hello_world:src/main.rs",
15*d4726bddSHONG Yifan        "@rules_rust//tools/upstream_wrapper:cargo",
16*d4726bddSHONG Yifan    ],
17*d4726bddSHONG Yifan    deps = [
18*d4726bddSHONG Yifan        "@bazel_tools//tools/bash/runfiles",
19*d4726bddSHONG Yifan    ],
20*d4726bddSHONG Yifan)
21*d4726bddSHONG Yifan
22*d4726bddSHONG Yifansh_test(
23*d4726bddSHONG Yifan    name = "upstream_rustc_test",
24*d4726bddSHONG Yifan    size = "small",
25*d4726bddSHONG Yifan    srcs = ["rustc_test.sh"],
26*d4726bddSHONG Yifan    args = [
27*d4726bddSHONG Yifan        "$(rlocationpath @rules_rust//tools/upstream_wrapper:rustc)",
28*d4726bddSHONG Yifan    ],
29*d4726bddSHONG Yifan    data = [
30*d4726bddSHONG Yifan        "@rules_rust//tools/upstream_wrapper:rustc",
31*d4726bddSHONG Yifan    ],
32*d4726bddSHONG Yifan    deps = [
33*d4726bddSHONG Yifan        "@bazel_tools//tools/bash/runfiles",
34*d4726bddSHONG Yifan    ],
35*d4726bddSHONG Yifan)
36*d4726bddSHONG Yifan
37*d4726bddSHONG Yifansh_test(
38*d4726bddSHONG Yifan    name = "upstream_rustfmt_test",
39*d4726bddSHONG Yifan    size = "small",
40*d4726bddSHONG Yifan    srcs = ["rustfmt_test.sh"],
41*d4726bddSHONG Yifan    args = [
42*d4726bddSHONG Yifan        "$(rlocationpath @rules_rust//tools/upstream_wrapper:rustfmt)",
43*d4726bddSHONG Yifan    ],
44*d4726bddSHONG Yifan    data = [
45*d4726bddSHONG Yifan        "@rules_rust//tools/upstream_wrapper:rustfmt",
46*d4726bddSHONG Yifan    ],
47*d4726bddSHONG Yifan    deps = [
48*d4726bddSHONG Yifan        "@bazel_tools//tools/bash/runfiles",
49*d4726bddSHONG Yifan    ],
50*d4726bddSHONG Yifan)
51