From 5a58b6d8d2cd154754425c6125bdbb3ff6381c8d Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Thu, 15 Apr 2021 21:59:06 -0700 Subject: [PATCH] Add http socket tests to other tests Merge from Widevine repo of http://go/wvgerrit/122224 This CL removes the separate main() in http_socket_test that allowed the user to set the server on the command line. I don't think anybody was using this, and it conflicted with our desire to include this suite of tests with the other CE CDM tests running on Luci. test: ran http_socket_test bug: 118657876 Change-Id: I9228b9cc97a0af2afd1bb4a99bc40b88ce956d67 --- .../cdm/core/test/http_socket_test.cpp | 40 ------------------- libwvdrmengine/cdm/test/Android.mk | 3 +- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/libwvdrmengine/cdm/core/test/http_socket_test.cpp b/libwvdrmengine/cdm/core/test/http_socket_test.cpp index 8de2d0d3..34a9f375 100644 --- a/libwvdrmengine/cdm/core/test/http_socket_test.cpp +++ b/libwvdrmengine/cdm/core/test/http_socket_test.cpp @@ -206,43 +206,3 @@ TEST_F(HttpSocketTest, RoundTripTest) { } } // namespace wvcdm - -int main(int argc, char** argv) { - using namespace wvcdm; - - ::testing::InitGoogleTest(&argc, argv); - - std::string temp; - std::string test_server(kHttpsTestServer); - std::string test_data(gTestData); - for (int i = 1; i < argc; i++) { - temp.assign(argv[i]); - if (temp.find("--server=") == 0) { - gTestServer.assign(temp.substr(strlen("--server="))); - } else if (temp.find("--data=") == 0) { - gTestData.assign(temp.substr(strlen("--data="))); - } else { - std::cout << "error: unknown option '" << argv[i] << "'" << std::endl; - std::cout << "usage: http_socket_test [options]" << std::endl - << std::endl; - std::cout << std::setw(30) << std::left << " --server="; - std::cout - << "configure the test server url, please include http[s] in the url" - << std::endl; - std::cout << std::setw(30) << std::left << " "; - std::cout << "default: " << test_server << std::endl; - std::cout << std::setw(30) << std::left << " --data="; - std::cout << "configure data to send, in ascii string format" - << std::endl; - std::cout << std::setw(30) << std::left << " "; - std::cout << "default: " << test_data << std::endl << std::endl; - return 0; - } - } - - std::cout << std::endl; - std::cout << "Server: " << gTestServer << std::endl; - std::cout << "Data: " << gTestData << std::endl; - - return RUN_ALL_TESTS(); -} diff --git a/libwvdrmengine/cdm/test/Android.mk b/libwvdrmengine/cdm/test/Android.mk index 734e1dd8..d37ee0f6 100644 --- a/libwvdrmengine/cdm/test/Android.mk +++ b/libwvdrmengine/cdm/test/Android.mk @@ -91,8 +91,7 @@ include $(LOCAL_PATH)/integration-test.mk test_name := http_socket_test test_src_dir := ../core/test -test_main := -include $(LOCAL_PATH)/integration-test.mk +include $(LOCAL_PATH)/unit-test.mk test_name := initialization_data_unittest test_src_dir := ../core/test