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
This commit is contained in:
Fred Gylys-Colwell
2021-04-15 21:59:06 -07:00
parent 14a034209c
commit 5a58b6d8d2
2 changed files with 1 additions and 42 deletions

View File

@@ -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=<server_url>";
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=<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();
}

View File

@@ -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