Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29b35b69 authored by Yifan Hong's avatar Yifan Hong
Browse files

lshal: resistent to metaversion updates.

When metaversion of libvintf updates, --init-vintf option
always uses the highest metaversion, breaking tests. These
tests should work with any metaversion of libvintf. The HAL
sections should be focused on.

Test: lshal_test

Change-Id: Ie5471ddd6dea7b8098d0be3385cfd1cc6c29824d
parent 52e3b47c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -479,8 +479,7 @@ TEST_F(ListTest, Fetch) {
}

TEST_F(ListTest, DumpVintf) {
    const std::string expected = "<manifest version=\"2.0\" type=\"device\">\n"
                                 "    <hal format=\"hidl\">\n"
    const std::string expected = "    <hal format=\"hidl\">\n"
                                 "        <name>a.h.foo1</name>\n"
                                 "        <transport>hwbinder</transport>\n"
                                 "        <fqname>@1.0::IFoo/1</fqname>\n"
@@ -499,8 +498,7 @@ TEST_F(ListTest, DumpVintf) {
                                 "        <name>a.h.foo4</name>\n"
                                 "        <transport arch=\"32\">passthrough</transport>\n"
                                 "        <fqname>@4.0::IFoo/4</fqname>\n"
                                 "    </hal>\n"
                                 "</manifest>";
                                 "    </hal>\n";

    optind = 1; // mimic Lshal::parseArg()
    EXPECT_EQ(0u, mockList->main(createArg({"lshal", "--init-vintf"})));