File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ tasks:
397
397
name : Negative Clippy Tests
398
398
platform : ubuntu2004
399
399
run_targets :
400
- - " //test/clippy:clippy_failure_test "
400
+ - " //test/clippy:clippy_failure_tester "
401
401
rustfmt_failure :
402
402
name : Negative Rustfmt Tests
403
403
platform : ubuntu2004
Original file line number Diff line number Diff line change 10
10
)
11
11
load ("@rules_shell//shell:sh_binary.bzl" , "sh_binary" )
12
12
13
- package (default_visibility = ["//test:__subpackages__ " ])
13
+ package (default_visibility = ["//test/unit/clippy:__pkg__ " ])
14
14
15
15
# Declaration of passing targets.
16
16
@@ -167,6 +167,6 @@ rust_clippy(
167
167
)
168
168
169
169
sh_binary (
170
- name = "clippy_failure_test " ,
171
- srcs = ["clippy_failure_test .sh" ],
170
+ name = "clippy_failure_tester " ,
171
+ srcs = ["clippy_failure_tester .sh" ],
172
172
)
Original file line number Diff line number Diff line change @@ -61,16 +61,32 @@ function test_all() {
61
61
62
62
mkdir -p " ${NEW_WORKSPACE} /test/clippy" && \
63
63
cp -r test/clippy/* " ${NEW_WORKSPACE} /test/clippy/" && \
64
- cat << EOF > "${NEW_WORKSPACE} /WORKSPACE.bazel"
65
- workspace(name = "rules_rust_test_clippy")
66
- local_repository(
67
- name = "rules_rust",
64
+ cat << EOF > "${NEW_WORKSPACE} /MODULE.bazel"
65
+ module(name = "rules_rust_test_clippy")
66
+ bazel_dep(name = "rules_rust", version = "0.0.0")
67
+ local_path_override(
68
+ module_name = "rules_rust",
68
69
path = "${BUILD_WORKSPACE_DIRECTORY} ",
69
70
)
70
- load("@rules_rust//rust:repositories.bzl", "rust_repositories")
71
- rust_repositories()
71
+
72
+ bazel_dep(
73
+ name = "bazel_skylib",
74
+ version = "1.7.1",
75
+ )
76
+ bazel_dep(
77
+ name = "rules_shell",
78
+ version = "0.3.0",
79
+ )
80
+
81
+ rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
82
+ use_repo(rust, "rust_toolchains")
83
+ register_toolchains("@rust_toolchains//:all")
72
84
EOF
73
85
86
+ if [[ -f " ${BUILD_WORKSPACE_DIRECTORY} /.bazelversion" ]]; then
87
+ cp " ${BUILD_WORKSPACE_DIRECTORY} /.bazelversion" " ${NEW_WORKSPACE} /.bazelversion"
88
+ fi
89
+
74
90
# Drop the 'noclippy' tags
75
91
if [ " $( uname) " == " Darwin" ]; then
76
92
SEDOPTS=(-i ' ' -e)
You can’t perform that action at this time.
0 commit comments