Loading Android.bp +4 −4 Original line number Diff line number Diff line Loading @@ -191,17 +191,17 @@ cc_test { "DnsQueryLogTest.cpp", ], shared_libs: [ "libbase", "libcrypto", "libcutils", "libssl", "libbinder_ndk", "liblog", "libssl", ], static_libs: [ "dnsresolver_aidl_interface-unstable-ndk_platform", "netd_event_listener_interface-ndk_platform", "libcutils", "libbase", "libgmock", "liblog", "libnetd_resolv", "libnetd_test_dnsresponder", "libnetd_test_resolv_utils", Loading tests/Android.bp +12 −7 Original line number Diff line number Diff line Loading @@ -46,8 +46,9 @@ cc_test { "libnetd_client_headers", ], shared_libs: [ "libbinder_ndk", "libcrypto", "libbinder_ndk", "liblog", "libssl", ], static_libs: [ Loading @@ -55,7 +56,6 @@ cc_test { "golddata_proto", "libbase", "libgmock", "liblog", "libnetd_resolv", "libnetd_test_dnsresponder_ndk", "libnetd_test_resolv_utils", Loading Loading @@ -83,17 +83,18 @@ cc_test { "libnetd_resolv_headers", ], shared_libs: [ "libbase", "libbinder_ndk", "liblog", "libnetd_client", "libutils", ], static_libs: [ "dnsresolver_aidl_interface-ndk_platform", "libbase", "libgmock", "libnetd_test_dnsresponder_ndk", "libnetd_test_resolv_utils", "libnetdutils", "libutils", "netd_event_listener_interface-ndk_platform", "netd_aidl_interface-ndk_platform", ], Loading @@ -119,6 +120,7 @@ cc_test { //stl: "libc++_static", shared_libs: [ "libbinder_ndk", "liblog", "libnetd_client", ], static_libs: [ Loading @@ -127,7 +129,6 @@ cc_test { "libbpf_android", "libcrypto_static", "libgmock", "liblog", "libnetd_test_dnsresponder_ndk", "libnetd_test_metrics_listener", "libnetd_test_resolv_utils", Loading Loading @@ -157,10 +158,12 @@ cc_test_library { ], defaults: ["netd_defaults"], export_include_dirs: ["."], shared_libs: [ "liblog", ], static_libs: [ "libbase", "libgmock", "liblog", "libnetdutils", "libprotobuf-cpp-lite", "stats_proto", Loading @@ -174,10 +177,12 @@ cc_test { ], defaults: ["netd_defaults"], test_suites: ["device-tests"], shared_libs: [ "liblog", ], static_libs: [ "libbase", "libgmock", "liblog", "libprotobuf-cpp-lite", "resolv_stats_test_utils", "stats_proto", Loading tests/resolv_integration_test.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ std::pair<ScopedAddrinfo, int> safe_getaddrinfo_time_taken(const char* node, con class ResolverTest : public ::testing::Test { public: static void SetUpTestCase() { static void SetUpTestSuite() { // Get binder service. // Note that |mDnsClient| is not used for getting binder service in this static function. // The reason is that wants to keep |mDnsClient| as a non-static data member. |mDnsClient| Loading Loading @@ -153,7 +153,7 @@ class ResolverTest : public ::testing::Test { // recipient. ABinderProcess_startThreadPool(); } static void TearDownTestCase() { AIBinder_DeathRecipient_delete(sResolvDeathRecipient); } static void TearDownTestSuite() { AIBinder_DeathRecipient_delete(sResolvDeathRecipient); } protected: void SetUp() { mDnsClient.SetUp(); } Loading Loading @@ -200,11 +200,11 @@ class ResolverTest : public ::testing::Test { // TODO: Perhaps add an unregistering listener binder call or fork a listener process which // could be terminated earlier. static std::shared_ptr<DnsMetricsListener> sDnsMetricsListener; // Initialized in SetUpTestCase. sDnsMetricsListener; // Initialized in SetUpTestSuite. // Use a shared static death recipient to monitor the service death. The static death // recipient could monitor the death not only during the test but also between tests. static AIBinder_DeathRecipient* sResolvDeathRecipient; // Initialized in SetUpTestCase. static AIBinder_DeathRecipient* sResolvDeathRecipient; // Initialized in SetUpTestSuite. }; // Initialize static member of class. Loading Loading
Android.bp +4 −4 Original line number Diff line number Diff line Loading @@ -191,17 +191,17 @@ cc_test { "DnsQueryLogTest.cpp", ], shared_libs: [ "libbase", "libcrypto", "libcutils", "libssl", "libbinder_ndk", "liblog", "libssl", ], static_libs: [ "dnsresolver_aidl_interface-unstable-ndk_platform", "netd_event_listener_interface-ndk_platform", "libcutils", "libbase", "libgmock", "liblog", "libnetd_resolv", "libnetd_test_dnsresponder", "libnetd_test_resolv_utils", Loading
tests/Android.bp +12 −7 Original line number Diff line number Diff line Loading @@ -46,8 +46,9 @@ cc_test { "libnetd_client_headers", ], shared_libs: [ "libbinder_ndk", "libcrypto", "libbinder_ndk", "liblog", "libssl", ], static_libs: [ Loading @@ -55,7 +56,6 @@ cc_test { "golddata_proto", "libbase", "libgmock", "liblog", "libnetd_resolv", "libnetd_test_dnsresponder_ndk", "libnetd_test_resolv_utils", Loading Loading @@ -83,17 +83,18 @@ cc_test { "libnetd_resolv_headers", ], shared_libs: [ "libbase", "libbinder_ndk", "liblog", "libnetd_client", "libutils", ], static_libs: [ "dnsresolver_aidl_interface-ndk_platform", "libbase", "libgmock", "libnetd_test_dnsresponder_ndk", "libnetd_test_resolv_utils", "libnetdutils", "libutils", "netd_event_listener_interface-ndk_platform", "netd_aidl_interface-ndk_platform", ], Loading @@ -119,6 +120,7 @@ cc_test { //stl: "libc++_static", shared_libs: [ "libbinder_ndk", "liblog", "libnetd_client", ], static_libs: [ Loading @@ -127,7 +129,6 @@ cc_test { "libbpf_android", "libcrypto_static", "libgmock", "liblog", "libnetd_test_dnsresponder_ndk", "libnetd_test_metrics_listener", "libnetd_test_resolv_utils", Loading Loading @@ -157,10 +158,12 @@ cc_test_library { ], defaults: ["netd_defaults"], export_include_dirs: ["."], shared_libs: [ "liblog", ], static_libs: [ "libbase", "libgmock", "liblog", "libnetdutils", "libprotobuf-cpp-lite", "stats_proto", Loading @@ -174,10 +177,12 @@ cc_test { ], defaults: ["netd_defaults"], test_suites: ["device-tests"], shared_libs: [ "liblog", ], static_libs: [ "libbase", "libgmock", "liblog", "libprotobuf-cpp-lite", "resolv_stats_test_utils", "stats_proto", Loading
tests/resolv_integration_test.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ std::pair<ScopedAddrinfo, int> safe_getaddrinfo_time_taken(const char* node, con class ResolverTest : public ::testing::Test { public: static void SetUpTestCase() { static void SetUpTestSuite() { // Get binder service. // Note that |mDnsClient| is not used for getting binder service in this static function. // The reason is that wants to keep |mDnsClient| as a non-static data member. |mDnsClient| Loading Loading @@ -153,7 +153,7 @@ class ResolverTest : public ::testing::Test { // recipient. ABinderProcess_startThreadPool(); } static void TearDownTestCase() { AIBinder_DeathRecipient_delete(sResolvDeathRecipient); } static void TearDownTestSuite() { AIBinder_DeathRecipient_delete(sResolvDeathRecipient); } protected: void SetUp() { mDnsClient.SetUp(); } Loading Loading @@ -200,11 +200,11 @@ class ResolverTest : public ::testing::Test { // TODO: Perhaps add an unregistering listener binder call or fork a listener process which // could be terminated earlier. static std::shared_ptr<DnsMetricsListener> sDnsMetricsListener; // Initialized in SetUpTestCase. sDnsMetricsListener; // Initialized in SetUpTestSuite. // Use a shared static death recipient to monitor the service death. The static death // recipient could monitor the death not only during the test but also between tests. static AIBinder_DeathRecipient* sResolvDeathRecipient; // Initialized in SetUpTestCase. static AIBinder_DeathRecipient* sResolvDeathRecipient; // Initialized in SetUpTestSuite. }; // Initialize static member of class. Loading