Build widevine tests with BOARD_VNDK_VERSION set
The tests are using vendor only libs such as libcdm and libwvlevel3, thus marked as LOCAL_PROPRIETARY_MODULE to use the libs. In addition, the dependency to libmedia is changed to libmedia_omx since libmedia is not available to vendor modules. UniquePtr is replaced with std::unique_ptr since UniquePtr.h in /libnativehelper is not available to vendors (and will not be completely removed in a near future). Bug: 37342627 Test: BOARD_VNDK_VERSION=current m -j tests Change-Id: I4e9d3267b20c1d52f57664b89f15330e2ebd953d
This commit is contained in:
@@ -42,7 +42,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
libcutils \
|
libcutils \
|
||||||
libdl \
|
libdl \
|
||||||
liblog \
|
liblog \
|
||||||
libmedia \
|
libmedia_omx \
|
||||||
libprotobuf-cpp-lite \
|
libprotobuf-cpp-lite \
|
||||||
libssl \
|
libssl \
|
||||||
libstagefright_foundation \
|
libstagefright_foundation \
|
||||||
@@ -51,6 +51,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
LOCAL_CFLAGS += -DUNIT_TEST
|
LOCAL_CFLAGS += -DUNIT_TEST
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ LOCAL_MODULE := libwvdrmmediacrypto_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
@@ -107,6 +108,7 @@ LOCAL_MODULE := libwvdrmmediacrypto_hidl_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ LOCAL_MODULE := libwvdrmdrmplugin_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
@@ -108,6 +109,7 @@ LOCAL_MODULE := libwvdrmdrmplugin_hidl_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ LOCAL_MODULE:=oemcrypto_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
libcutils \
|
libcutils \
|
||||||
libdl \
|
libdl \
|
||||||
liblog \
|
liblog \
|
||||||
libmedia \
|
libmedia_omx \
|
||||||
libstagefright_foundation \
|
libstagefright_foundation \
|
||||||
libutils \
|
libutils \
|
||||||
libz \
|
libz \
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ LOCAL_MODULE := libwvdrmengine_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
@@ -82,6 +83,7 @@ LOCAL_MODULE := libwvdrmengine_hidl_test
|
|||||||
LOCAL_MODULE_TAGS := tests
|
LOCAL_MODULE_TAGS := tests
|
||||||
|
|
||||||
LOCAL_MODULE_OWNER := widevine
|
LOCAL_MODULE_OWNER := widevine
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
# When built, explicitly put it in the DATA/bin directory.
|
# When built, explicitly put it in the DATA/bin directory.
|
||||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin
|
||||||
|
|||||||
@@ -3,20 +3,21 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include <UniquePtr.h>
|
|
||||||
#include "WVCreatePluginFactories.h"
|
#include "WVCreatePluginFactories.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
using namespace android;
|
using namespace android;
|
||||||
|
|
||||||
TEST(CreatePluginFactoriesTest, CreatesDrmFactory) {
|
TEST(CreatePluginFactoriesTest, CreatesDrmFactory) {
|
||||||
UniquePtr<DrmFactory> factory(createDrmFactory());
|
std::unique_ptr<DrmFactory> factory(createDrmFactory());
|
||||||
|
|
||||||
EXPECT_NE((DrmFactory*)NULL, factory.get()) <<
|
EXPECT_NE((DrmFactory*)NULL, factory.get()) <<
|
||||||
"createDrmFactory() returned null";
|
"createDrmFactory() returned null";
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(CreatePluginFactoriesTest, CreatesCryptoFactory) {
|
TEST(CreatePluginFactoriesTest, CreatesCryptoFactory) {
|
||||||
UniquePtr<CryptoFactory> factory(createCryptoFactory());
|
std::unique_ptr<CryptoFactory> factory(createCryptoFactory());
|
||||||
|
|
||||||
EXPECT_NE((CryptoFactory*)NULL, factory.get()) <<
|
EXPECT_NE((CryptoFactory*)NULL, factory.get()) <<
|
||||||
"createCryptoFactory() returned null";
|
"createCryptoFactory() returned null";
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
* Copyright 2012 Google Inc. All Rights Reserved.
|
* Copyright 2012 Google Inc. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <UniquePtr.h>
|
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "WVCryptoFactory.h"
|
#include "WVCryptoFactory.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
using namespace wvdrm;
|
using namespace wvdrm;
|
||||||
|
|
||||||
const uint8_t kWidevineUUID[16] = {
|
const uint8_t kWidevineUUID[16] = {
|
||||||
@@ -25,7 +25,7 @@ const uint8_t kUnknownUUID[16] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TEST(WVCryptoFactoryTest, SupportsSupportedCryptoSchemes) {
|
TEST(WVCryptoFactoryTest, SupportsSupportedCryptoSchemes) {
|
||||||
UniquePtr<WVCryptoFactory> factory(new WVCryptoFactory());
|
std::unique_ptr<WVCryptoFactory> factory(new WVCryptoFactory());
|
||||||
|
|
||||||
EXPECT_TRUE(factory->isCryptoSchemeSupported(kWidevineUUID)) <<
|
EXPECT_TRUE(factory->isCryptoSchemeSupported(kWidevineUUID)) <<
|
||||||
"WVPluginFactory does not support Widevine's UUID";
|
"WVPluginFactory does not support Widevine's UUID";
|
||||||
@@ -35,7 +35,7 @@ TEST(WVCryptoFactoryTest, SupportsSupportedCryptoSchemes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(WVCryptoFactoryTest, DoesNotSupportUnsupportedCryptoSchemes) {
|
TEST(WVCryptoFactoryTest, DoesNotSupportUnsupportedCryptoSchemes) {
|
||||||
UniquePtr<WVCryptoFactory> factory(new WVCryptoFactory());
|
std::unique_ptr<WVCryptoFactory> factory(new WVCryptoFactory());
|
||||||
|
|
||||||
EXPECT_FALSE(factory->isCryptoSchemeSupported(kUnknownUUID)) <<
|
EXPECT_FALSE(factory->isCryptoSchemeSupported(kUnknownUUID)) <<
|
||||||
"WVPluginFactory incorrectly claims to support an unknown UUID";
|
"WVPluginFactory incorrectly claims to support an unknown UUID";
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include <UniquePtr.h>
|
|
||||||
#include "WVDrmFactory.h"
|
#include "WVDrmFactory.h"
|
||||||
|
|
||||||
using namespace wvdrm;
|
using namespace wvdrm;
|
||||||
|
|||||||
Reference in New Issue
Block a user