Cherry pick 18.4 changes to udc-widevine-dev
Get the udc-widevine-dev Android branch and oemcrypto-v18 cdm branch in sync. The commit ID for 18.4 on oemcrypto-v18 is a2f23a2281e5e06dc2867585bdc516fa132b6396. Merged from go/wvgerrit/190151 Bug: 290252845 Test: WVTS tests are running and passing Change-Id: I457332e7ca70a5b5169345e1279b3eb9f18413b6
This commit is contained in:
44
libwvdrmengine/cdm/test/cdm_test_main.cpp
Normal file
44
libwvdrmengine/cdm/test/cdm_test_main.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
|
||||
#include <assert.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cdm.h"
|
||||
#include "cdm_test_runner.h"
|
||||
#include "log.h"
|
||||
#include "test_base.h"
|
||||
#include "test_host.h"
|
||||
|
||||
using namespace widevine;
|
||||
|
||||
TestHost* g_host = nullptr;
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
g_host = new TestHost();
|
||||
|
||||
// TODO(b/195338975): document that using a real IStorage means you should not
|
||||
// run the tests in $CDM_DIR/cdm/test/cdm_test.cpp
|
||||
|
||||
// Partners will want to replace this with a real IStorage.
|
||||
Cdm::IStorage* const storage = &g_host->global_storage();
|
||||
|
||||
// Partners may also want to replace this with real implementations of IClock
|
||||
// and ITimer. If so, make not to set the command line argument
|
||||
// "--fake_sleep".
|
||||
Cdm::IClock* const clock = g_host;
|
||||
Cdm::ITimer* const timer = g_host;
|
||||
|
||||
// Partners who prefer their logs to go somewhere other than stderr may want
|
||||
// to replace this implementation.
|
||||
Cdm::ILogger* const logger = &g_stderr_logger;
|
||||
|
||||
const int test_results = Main(storage, clock, timer, logger, argc, argv);
|
||||
return test_results;
|
||||
}
|
||||
Reference in New Issue
Block a user