summaryrefslogtreecommitdiff
path: root/rust/testing.go
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2020-06-05 11:09:27 +0200
committerThiƩbaud Weksteen <tweek@google.com>2020-06-11 11:22:31 +0200
commite4d12a04684ad7792f797fb676541af99311d941 (patch)
treefae8fa50c05b3a751de136f6a816a163639de5b6 /rust/testing.go
parent4a19d08d39f85403708111dbe44bdd1174959566 (diff)
Add rust-project.json generator
Because we are not relying on Cargo.toml for our crate dependencies, we need to provide a structured file to rust-analyzer which describes the locations of the crates. Add a generator for that purpose, similarly to cc/compdb and cc/ccdeps. Bug: 156395307 Test: SOONG_GEN_RUST_PROJECT=1 m nothing && \ cat ${ANDROID_BUILD_TOP}/out/soong/rust-project.json Change-Id: I46efe0adeddae281eaf86707504c3aa15b5e80b8
Diffstat (limited to 'rust/testing.go')
-rw-r--r--rust/testing.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/testing.go b/rust/testing.go
index 09008a85f..f94af71ee 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -100,6 +100,7 @@ func CreateTestContext() *android.TestContext {
ctx.BottomUp("rust_unit_tests", TestPerSrcMutator).Parallel()
ctx.BottomUp("rust_begin", BeginMutator).Parallel()
})
+ ctx.RegisterSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
return ctx
}