-
Notifications
You must be signed in to change notification settings - Fork 590
Expand file tree
/
Copy pathBUILD.bazel
More file actions
41 lines (36 loc) · 1.18 KB
/
BUILD.bazel
File metadata and controls
41 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load(":generated_srcs_test.bzl", "generated_srcs_analysis_test_suite", "rust_generated_src")
rust_generated_src(
name = "generated_rs",
out = "generated.rs",
content = "pub fn forty_two() -> i32 { 42 }\n",
)
rust_library(
name = "generated_srcs",
srcs = [
"lib.rs",
":generated_rs",
],
edition = "2021",
)
rust_test(
name = "generated_srcs_test",
crate = ":generated_srcs",
)
rust_test(
name = "rust_project_json_test",
srcs = ["rust_project_json_test.rs"],
data = [":rust-project.json"],
edition = "2021",
env = {"RUST_PROJECT_JSON": "$(rootpath :rust-project.json)"},
# This target is tagged as manual since it's not expected to pass in
# contexts outside of `//test/rust_analyzer:rust_analyzer_test`. Run
# that target to execute this test.
tags = ["manual"],
deps = [
"//test/rust_analyzer/3rdparty/crates:serde",
"//test/rust_analyzer/3rdparty/crates:serde_json",
],
)
############################ UNIT TESTS #############################
generated_srcs_analysis_test_suite(name = "generated_srcs_analysis_test_suite")