diff options
author | Chih-Hung Hsieh <chh@google.com> | 2020-08-10 21:50:43 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2020-08-11 16:38:52 -0700 |
commit | a756270ec2f819c91b4cb47dbbcf8f6690dfe382 (patch) | |
tree | 90eff485030f28663b2bec0316ffd30a7bc74869 /rust/binary_test.go | |
parent | eaebec13127c17304ede6b9553fdbe327848fd3b (diff) |
HostToolPath should return install path
Bug: 163154468
Test: make; find dependencies of 'Module: sqlite3_bindgen_x86_64'
Change-Id: Id9fc4f1937983bdf7eb1732ed6a8afd5aa3eb24c
Diffstat (limited to 'rust/binary_test.go')
-rw-r--r-- | rust/binary_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/binary_test.go b/rust/binary_test.go index ab2dae153..b9c8698b9 100644 --- a/rust/binary_test.go +++ b/rust/binary_test.go @@ -36,6 +36,11 @@ func TestPreferDynamicBinary(t *testing.T) { fizzBuzz := ctx.ModuleForTests("fizz-buzz", "linux_glibc_x86_64").Output("fizz-buzz") fizzBuzzDynamic := ctx.ModuleForTests("fizz-buzz-dynamic", "linux_glibc_x86_64").Output("fizz-buzz-dynamic") + path := ctx.ModuleForTests("fizz-buzz", "linux_glibc_x86_64").Module().(*Module).HostToolPath() + if g, w := path.String(), "/host/linux-x86/bin/fizz-buzz"; !strings.Contains(g, w) { + t.Errorf("wrong host tool path, expected %q got %q", w, g) + } + // Do not compile binary modules with the --test flag. flags := fizzBuzzDynamic.Args["rustcFlags"] if strings.Contains(flags, "--test") { |