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

Commit b76b6287 authored by Robert Shih's avatar Robert Shih
Browse files

drm aidl vts: proper skip tests without vendor module

Bug: 253168737
Test: VtsAidlHalDrmTargetTest
Change-Id: Iaac3ef19197dceea16061e9926c831818b27bd14
parent 331a2bf9
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -187,6 +187,12 @@ void DrmHalTest::SetUp() {
    auto svc = GetParamService();
    auto svc = GetParamService();
    const string drmInstance = HalFullName(kDrmIface, svc);
    const string drmInstance = HalFullName(kDrmIface, svc);


    if (!vendorModule) {
        ASSERT_NE(drmInstance, HalFullName(kDrmIface, "widevine")) << "Widevine requires vendor module.";
        ASSERT_NE(drmInstance, HalFullName(kDrmIface, "clearkey")) << "Clearkey requires vendor module.";
        GTEST_SKIP() << "No vendor module installed";
    }

    if (drmInstance.find("IDrmFactory") != std::string::npos) {
    if (drmInstance.find("IDrmFactory") != std::string::npos) {
        drmFactory = IDrmFactory::fromBinder(
        drmFactory = IDrmFactory::fromBinder(
                ::ndk::SpAIBinder(AServiceManager_waitForService(drmInstance.c_str())));
                ::ndk::SpAIBinder(AServiceManager_waitForService(drmInstance.c_str())));
@@ -195,12 +201,6 @@ void DrmHalTest::SetUp() {
        cryptoPlugin = createCryptoPlugin();
        cryptoPlugin = createCryptoPlugin();
    }
    }


    if (!vendorModule) {
        ASSERT_NE(drmInstance, "widevine") << "Widevine requires vendor module.";
        ASSERT_NE(drmInstance, "clearkey") << "Clearkey requires vendor module.";
        GTEST_SKIP() << "No vendor module installed";
    }

    ASSERT_EQ(HalBaseName(drmInstance), vendorModule->getServiceName());
    ASSERT_EQ(HalBaseName(drmInstance), vendorModule->getServiceName());
    contentConfigurations = vendorModule->getContentConfigurations();
    contentConfigurations = vendorModule->getContentConfigurations();