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

Commit f0edee59 authored by Christopher Ferris's avatar Christopher Ferris Committed by android-build-merger
Browse files

Merge "Add test mapping to run the libunwind tests."

am: c3163e76

Change-Id: Ib82965bef7d9e9a983cbc7d282fa59abab083ece
parents 44d025d9 c3163e76
Loading
Loading
Loading
Loading
+20 −4
Original line number Original line Diff line number Diff line
@@ -153,12 +153,12 @@ cc_test_library {
    shared_libs: [
    shared_libs: [
        "libunwindstack",
        "libunwindstack",
    ],
    ],
    relative_install_path: "libunwindstack_test",
}
}


cc_test {
cc_defaults {
    name: "libunwindstack_test",
    name: "libunwindstack_testlib_flags",
    defaults: ["libunwindstack_flags"],
    defaults: ["libunwindstack_flags"],
    isolated: true,


    srcs: [
    srcs: [
        "tests/ArmExidxDecodeTest.cpp",
        "tests/ArmExidxDecodeTest.cpp",
@@ -183,7 +183,6 @@ cc_test {
        "tests/ElfTestUtils.cpp",
        "tests/ElfTestUtils.cpp",
        "tests/IsolatedSettings.cpp",
        "tests/IsolatedSettings.cpp",
        "tests/JitDebugTest.cpp",
        "tests/JitDebugTest.cpp",
        "tests/LocalUnwinderTest.cpp",
        "tests/LogFake.cpp",
        "tests/LogFake.cpp",
        "tests/MapInfoCreateMemoryTest.cpp",
        "tests/MapInfoCreateMemoryTest.cpp",
        "tests/MapInfoGetBuildIDTest.cpp",
        "tests/MapInfoGetBuildIDTest.cpp",
@@ -253,11 +252,28 @@ cc_test {
        "tests/files/offline/straddle_arm/*",
        "tests/files/offline/straddle_arm/*",
        "tests/files/offline/straddle_arm64/*",
        "tests/files/offline/straddle_arm64/*",
    ],
    ],
}

cc_test {
    name: "libunwindstack_test",
    defaults: ["libunwindstack_testlib_flags"],
    isolated: true,

    srcs: [
        "tests/LocalUnwinderTest.cpp",
    ],
    required: [
    required: [
        "libunwindstack_local",
        "libunwindstack_local",
    ],
    ],
}
}


// Skip LocalUnwinderTest until atest understands required properly.
cc_test {
    name: "libunwindstack_unit_test",
    defaults: ["libunwindstack_testlib_flags"],
    isolated: true,
}

//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Tools
// Tools
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
+7 −0
Original line number Original line Diff line number Diff line
{
  "presubmit": [
    {
      "name": "libunwindstack_unit_test"
    }
  ]
}
+3 −3
Original line number Original line Diff line number Diff line
@@ -170,10 +170,10 @@ TEST_F(LocalUnwinderTest, unwind_after_dlopen) {


  std::string testlib(testing::internal::GetArgvs()[0]);
  std::string testlib(testing::internal::GetArgvs()[0]);
  auto const value = testlib.find_last_of('/');
  auto const value = testlib.find_last_of('/');
  if (value == std::string::npos) {
  if (value != std::string::npos) {
    testlib = "../";
    testlib = testlib.substr(0, value + 1);
  } else {
  } else {
    testlib = testlib.substr(0, value + 1) + "../";
    testlib = "";
  }
  }
  testlib += "libunwindstack_local.so";
  testlib += "libunwindstack_local.so";