Files
android/libwvdrmengine/cdm/test/cdm_test_main.cpp
Alex Dale 16c704fa09 Android tests call exit() when complete.
[ Merge of http://go/wvgerrit/119804 ]

The coverage framework used by Android requires the process to call
exit() for coverage information to be dumped after the tests.

Android unit tests have been adapted to use the a new main module.
The core test_main.cpp used by integration tests has been updated to
call exit().

Bug: 138941105
Test: Linux and Android unittests
Change-Id: Ifffc7b8290c50dffe527738a36547c1d2fb90bd3
2021-03-12 16:22:20 -08:00

18 lines
526 B
C++

// Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#include <stdlib.h>
#include "gtest/gtest.h"
#include "log.h"
int main(int argc, char** argv) {
LOGI("Running Android CDM tests");
testing::InitGoogleTest(&argc, argv);
const int status = RUN_ALL_TESTS();
LOGD("CDM test complete with status %d", status);
exit(status); // Explicit call to exit() is required for code coverage.
return status;
}