summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2017-10-15 04:02:19 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-15 04:02:19 +0000
commitb41245aa9c5d68e65902bad3492c14bd805fadc6 (patch)
treed3eb0782bdf437b46d678e95ecbe36d2d103f1ed
parent4d2fa111691c6ba1541cc7cfff14853d8a8aaa7a (diff)
parent66bd13c60ac6aff2c627e41917ba2ff077563504 (diff)
downloadlibfmq-b41245aa9c5d68e65902bad3492c14bd805fadc6.tar.gz
Merge "fmq_test using static passthrough libs" am: 4e5a2a5a92 am: 0a4676d0dd am: 9a97c5fe90
am: 66bd13c60a Change-Id: Iaea3284027ad306dc400627778b0b142e6d1d8fd
-rw-r--r--Android.bp4
-rw-r--r--tests/Android.bp65
-rw-r--r--tests/Android.mk36
-rw-r--r--tests/AndroidTest.xml7
4 files changed, 69 insertions, 43 deletions
diff --git a/Android.bp b/Android.bp
index 664c60d..5b7459f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+subdirs = [
+ "tests",
+]
+
cc_library_shared {
name: "libfmq",
shared_libs: [
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..ab2b2ce
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,65 @@
+//
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_test {
+ name: "mq_test_client",
+ srcs: ["msgq_test_client.cpp"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "libbase",
+ "libcutils",
+ "libfmq",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ ],
+
+ // Allow dlsym'ing self for statically linked passthrough implementations
+ ldflags: ["-rdynamic"],
+
+ // These are static libs only for testing purposes and portability. Shared
+ // libs should be used on device.
+ static_libs: ["android.hardware.tests.msgq@1.0"],
+ whole_static_libs: ["android.hardware.tests.msgq@1.0-impl"],
+}
+
+cc_test {
+ name: "mq_test",
+
+ srcs: ["mq_test.cpp"],
+ shared_libs: [
+ "libbase",
+ "libcutils",
+ "libfmq",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/tests/Android.mk b/tests/Android.mk
index 673d485..718a33b 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -29,42 +29,6 @@ LOCAL_REQUIRED_MODULES := \
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- msgq_test_client.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- libcutils \
- libutils \
- libbase \
- libfmq \
- liblog
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES += android.hardware.tests.msgq@1.0 libfmq
-LOCAL_MODULE := mq_test_client
-LOCAL_REQUIRED_MODULES := \
- android.hardware.tests.msgq@1.0-impl_32 \
- android.hardware.tests.msgq@1.0-impl
-
-include $(BUILD_NATIVE_TEST)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- mq_test.cpp
-LOCAL_STATIC_LIBRARIES := libutils libcutils liblog
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- libbase \
- libfmq
-LOCAL_MODULE := mq_test
-LOCAL_CFLAGS := -Wall -Werror
-include $(BUILD_NATIVE_TEST)
-
-include $(CLEAR_VARS)
LOCAL_MODULE := VtsFmqUnitTests
VTS_CONFIG_SRC_DIR := system/libfmq/tests
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index f861a10..70df24d 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -22,19 +22,12 @@
<option name="push" value="DATA/nativetest/mq_test_client/mq_test_client->/data/nativetest/mq_test_client/mq_test_client" />
<option name="push" value="DATA/nativetest64/mq_test_client/mq_test_client->/data/nativetest64/mq_test_client/mq_test_client" />
<option name="push" value="DATA/nativetest64/hidl_test_helper->/data/nativetest64/hidl_test_helper" />
- <option name="push" value="DATA/lib/android.hardware.tests.msgq@1.0.so->/data/local/tmp/system/lib/android.hardware.tests.msgq@1.0.so" />
- <option name="push" value="DATA/lib64/android.hardware.tests.msgq@1.0.so->/data/local/tmp/system/lib64/android.hardware.tests.msgq@1.0.so" />
- <option name="push" value="DATA/lib/hw/android.hardware.tests.msgq@1.0-impl.so->/data/local/tmp/system/lib/hw/android.hardware.tests.msgq@1.0-impl.so" />
- <option name="push" value="DATA/lib64/hw/android.hardware.tests.msgq@1.0-impl.so->/data/local/tmp/system/lib64/hw/android.hardware.tests.msgq@1.0-impl.so" />
</target_preparer>
<target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
<option name="test-module-name" value="VtsFmqUnitTests" />
<option name="binary-test-type" value="binary_test" />
<option name="binary-test-source" value="DATA/nativetest64/fmq_test->/data/nativetest64/fmq_test" />
- <option name="binary-test-envp" value="VTS_ROOT_PATH=/data/local/tmp" />
- <option name="binary-test-args" value="-x /data/local/tmp/system/lib" />
- <option name="binary-test-args" value="-y /data/local/tmp/system/lib64" />
<option name="test-timeout" value="1m"/>
</test>
</configuration>