Fix netd tests for use with APCT

Change-Id: Ica37a812c37036ffecd45b8f078d8ed9928d01fc
diff --git a/tests/Android.mk b/tests/Android.mk
index b147694..2d452c9 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -15,23 +15,18 @@
 #
 LOCAL_PATH := $(call my-dir)
 
-# DNS responder tests.
+# APCT build target
 include $(CLEAR_VARS)
-LOCAL_MODULE := netd_test
+LOCAL_MODULE := netd_integration_test
+LOCAL_CFLAGS := -Wall -Werror -Wunused-parameter
 EXTRA_LDLIBS := -lpthread
-LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libnetd_client
+LOCAL_SHARED_LIBRARIES += libbase libbinder libcutils liblog liblogwrap libnetdaidl libnetd_client \
+			  libutils
 LOCAL_STATIC_LIBRARIES += libtestUtil
-LOCAL_C_INCLUDES += system/netd/include system/extras/tests/include
-LOCAL_SRC_FILES := netd_test.cpp dns_responder.cpp
+LOCAL_AIDL_INCLUDES := system/netd/server/binder
+LOCAL_C_INCLUDES += system/netd/include system/extras/tests/include system/netd/binder/include \
+		    system/netd/server system/core/logwrapper/include
+LOCAL_SRC_FILES := netd_test.cpp dns_responder.cpp binder_test.cpp ../server/NetdConstants.cpp
 LOCAL_MODULE_TAGS := eng tests
 include $(BUILD_NATIVE_TEST)
 
-# netd binder interface tests.
-include $(CLEAR_VARS)
-LOCAL_MODULE := netd_binder_test
-LOCAL_SHARED_LIBRARIES += libbase libbinder liblogwrap libutils libnetdaidl
-LOCAL_C_INCLUDES += system/netd/include system/netd/binder/include system/netd/server system/core/logwrapper/include
-LOCAL_AIDL_INCLUDES := system/netd/server/binder
-LOCAL_SRC_FILES := binder_test.cpp ../server/NetdConstants.cpp
-LOCAL_MODULE_TAGS := tests
-include $(BUILD_NATIVE_TEST)
diff --git a/tests/netd_test.cpp b/tests/netd_test.cpp
index 73c9a02..c679dd2 100644
--- a/tests/netd_test.cpp
+++ b/tests/netd_test.cpp
@@ -174,7 +174,7 @@
             ++found;
         }
     }
-    EXPECT_EQ(1, found);
+    EXPECT_EQ(1U, found);
     ASSERT_FALSE(result == nullptr);
     ASSERT_EQ(4, result->h_length);
     ASSERT_FALSE(result->h_addr_list[0] == nullptr);
@@ -204,7 +204,7 @@
             ++found;
         }
     }
-    EXPECT_LE(1, found);
+    EXPECT_LE(1U, found);
     // Could be A or AAAA
     std::string result_str = ToString(result);
     EXPECT_TRUE(result_str == "1.2.3.4" || result_str == "::1.2.3.4");
@@ -241,7 +241,7 @@
             ++found;
         }
     }
-    EXPECT_LE(1, found);
+    EXPECT_LE(1U, found);
     // Could be A or AAAA
     result_str = ToString(result);
     EXPECT_TRUE(result_str == "1.2.3.44" || result_str == "::1.2.3.44");
@@ -270,7 +270,7 @@
             ++found;
         }
     }
-    EXPECT_LE(1, found);
+    EXPECT_LE(1U, found);
     EXPECT_EQ("1.2.3.5", ToString(result));
     if (result) freeaddrinfo(result);
 }