// 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 #include #include #include #include #include #include #include "cdm.h" #include "cdm_test_runner.h" #include "log.h" #include "test_base.h" #include "test_host.h" using namespace CDM_NAMESPACE; 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; }