Convert fuchsia tests to use test fixtures
Bug: 181070625 Test: m nothing Change-Id: Ic2b86f7c603ff1c4b48884cb58908db536d98f37
This commit is contained in:
@@ -181,13 +181,12 @@ func TestFuchsiaDeps(t *testing.T) {
|
||||
},
|
||||
}`
|
||||
|
||||
config := TestConfig(buildDir, android.Fuchsia, nil, bp, nil)
|
||||
ctx := testCcWithConfig(t, config)
|
||||
result := ccFixtureFactory.Extend(PrepareForTestOnFuchsia).RunTestWithBp(t, bp)
|
||||
|
||||
rt := false
|
||||
fb := false
|
||||
|
||||
ld := ctx.ModuleForTests("libTest", "fuchsia_arm64_shared").Rule("ld")
|
||||
ld := result.ModuleForTests("libTest", "fuchsia_arm64_shared").Rule("ld")
|
||||
implicits := ld.Implicits
|
||||
for _, lib := range implicits {
|
||||
if strings.Contains(lib.Rel(), "libcompiler_rt") {
|
||||
@@ -218,16 +217,13 @@ func TestFuchsiaTargetDecl(t *testing.T) {
|
||||
},
|
||||
}`
|
||||
|
||||
config := TestConfig(buildDir, android.Fuchsia, nil, bp, nil)
|
||||
ctx := testCcWithConfig(t, config)
|
||||
ld := ctx.ModuleForTests("libTest", "fuchsia_arm64_shared").Rule("ld")
|
||||
result := ccFixtureFactory.Extend(PrepareForTestOnFuchsia).RunTestWithBp(t, bp)
|
||||
ld := result.ModuleForTests("libTest", "fuchsia_arm64_shared").Rule("ld")
|
||||
var objs []string
|
||||
for _, o := range ld.Inputs {
|
||||
objs = append(objs, o.Base())
|
||||
}
|
||||
if len(objs) != 2 || objs[0] != "foo.o" || objs[1] != "bar.o" {
|
||||
t.Errorf("inputs of libTest must be []string{\"foo.o\", \"bar.o\"}, but was %#v.", objs)
|
||||
}
|
||||
result.AssertArrayString("libTest inputs", []string{"foo.o", "bar.o"}, objs)
|
||||
}
|
||||
|
||||
func TestVendorSrc(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user