Merge "Add VTS testcases for power.stats HAL"
diff --git a/audio/effect/V2_0/target_replay/AndroidTest.xml b/audio/effect/V2_0/target_replay/AndroidTest.xml
index 16aff53..b497ef5 100644
--- a/audio/effect/V2_0/target_replay/AndroidTest.xml
+++ b/audio/effect/V2_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-misc" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/audio/common/2.0/vts/types.vts->/data/local/tmp/spec/android/hardware/audio/common/2.0/types.vts"/>
<option name="push" value="DATA/lib/android.hardware.audio.common@2.0-vts.driver.so->/data/local/tmp/32/android.hardware.audio.common@2.0-vts.driver.so"/>
diff --git a/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml b/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml
index e2ca2ad..0d19e7c 100644
--- a/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml
+++ b/biometrics/fingerprint/V2_1/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts->/data/local/tmp/spec/android/hardware/biometrics/fingerprint/2.1/BiometricsFingerprint.vts"/>
<option name="push" value="spec/hardware/interfaces/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts->/data/local/tmp/spec/android/hardware/biometrics/fingerprint/2.1/BiometricsFingerprintClientCallback.vts"/>
diff --git a/bluetooth/V1_0/target_replay/AndroidTest.xml b/bluetooth/V1_0/target_replay/AndroidTest.xml
index 6787bcd..a3a52c0 100644
--- a/bluetooth/V1_0/target_replay/AndroidTest.xml
+++ b/bluetooth/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-misc" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/bluetooth/1.0/vts/BluetoothHci.vts->/data/local/tmp/spec/android/hardware/bluetooth/1.0/BluetoothHci.vts"/>
<option name="push" value="spec/hardware/interfaces/bluetooth/1.0/vts/BluetoothHciCallbacks.vts->/data/local/tmp/spec/android/hardware/bluetooth/1.0/BluetoothHciCallbacks.vts"/>
diff --git a/configstore/V1_0/target_replay/AndroidTest.xml b/configstore/V1_0/target_replay/AndroidTest.xml
index 6163503..a8d8b93 100644
--- a/configstore/V1_0/target_replay/AndroidTest.xml
+++ b/configstore/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-misc" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/configstore/1.0/vts/SurfaceFlingerConfigs.vts->/data/local/tmp/spec/android/hardware/configstore/1.0/SurfaceFlingerConfigs.vts"/>
<option name="push" value="spec/hardware/interfaces/configstore/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/configstore/1.0/types.vts"/>
diff --git a/configstore/V1_2/build/Android.bp b/configstore/V1_2/build/Android.bp
index 5bacd19..921bbda 100644
--- a/configstore/V1_2/build/Android.bp
+++ b/configstore/V1_2/build/Android.bp
@@ -49,6 +49,7 @@
"android.hardware.configstore@1.1-vts.driver",
"android.hardware.graphics.common@1.0-vts.driver",
"android.hardware.graphics.common@1.1-vts.driver",
+ "android.hardware.graphics.common@1.2-vts.driver",
],
static_libs: [
"android.hardware.configstore@1.0",
@@ -56,6 +57,7 @@
"android.hardware.configstore@1.2",
"android.hardware.graphics.common@1.0",
"android.hardware.graphics.common@1.1",
+ "android.hardware.graphics.common@1.2",
],
}
@@ -95,6 +97,7 @@
"android.hardware.configstore@1.1-vts.profiler",
"android.hardware.graphics.common@1.0-vts.profiler",
"android.hardware.graphics.common@1.1-vts.profiler",
+ "android.hardware.graphics.common@1.2-vts.profiler",
],
static_libs: [
"android.hardware.configstore@1.0",
@@ -102,6 +105,7 @@
"android.hardware.configstore@1.2",
"android.hardware.graphics.common@1.0",
"android.hardware.graphics.common@1.1",
+ "android.hardware.graphics.common@1.2",
],
}
diff --git a/configstore/V1_2/target/Android.mk b/configstore/V1_2/target/Android.mk
new file mode 100644
index 0000000..23ad919
--- /dev/null
+++ b/configstore/V1_2/target/Android.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2018 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := VtsHalConfigstoreV1_2Target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/configstore/V1_2/target/AndroidTest.xml b/configstore/V1_2/target/AndroidTest.xml
new file mode 100644
index 0000000..caf1220
--- /dev/null
+++ b/configstore/V1_2/target/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.
+-->
+<configuration description="Config for VTS VtsHalConfigstoreV1_2Target test cases">
+ <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="abort-on-push-failure" value="false"/>
+ <option name="push-group" value="HalHidlTargetTest.push"/>
+ </target_preparer>
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="VtsHalConfigstoreV1_2Target"/>
+ <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalConfigstoreV1_2TargetTest/VtsHalConfigstoreV1_2TargetTest" />
+ <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalConfigstoreV1_2TargetTest/VtsHalConfigstoreV1_2TargetTest" />
+ <option name="binary-test-type" value="hal_hidl_gtest"/>
+ <option name="binary-test-disable-framework" value="true"/>
+ <option name="test-timeout" value="5m"/>
+ </test>
+</configuration>
diff --git a/contexthub/V1_0/target_replay/AndroidTest.xml b/contexthub/V1_0/target_replay/AndroidTest.xml
index 6fe76d2..ff4d80a 100644
--- a/contexthub/V1_0/target_replay/AndroidTest.xml
+++ b/contexthub/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/contexthub/1.0/vts/Contexthub.vts->/data/local/tmp/spec/android/hardware/contexthub/1.0/Contexthub.vts"/>
<option name="push" value="spec/hardware/interfaces/contexthub/1.0/vts/ContexthubCallback.vts->/data/local/tmp/spec/android/hardware/contexthub/1.0/ContexthubCallback.vts"/>
diff --git a/gatekeeper/V1_0/target_replay/AndroidTest.xml b/gatekeeper/V1_0/target_replay/AndroidTest.xml
index a7d5b52..50d31b1 100644
--- a/gatekeeper/V1_0/target_replay/AndroidTest.xml
+++ b/gatekeeper/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-misc" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/gatekeeper/1.0/vts/Gatekeeper.vts->/data/local/tmp/spec/android/hardware/gatekeeper/1.0/Gatekeeper.vts"/>
<option name="push" value="spec/hardware/interfaces/gatekeeper/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/gatekeeper/1.0/types.vts"/>
diff --git a/graphics/common/V1_2/build/Android.bp b/graphics/common/V1_2/build/Android.bp
new file mode 100644
index 0000000..5330c77
--- /dev/null
+++ b/graphics/common/V1_2/build/Android.bp
@@ -0,0 +1,99 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+ name: "android.hardware.graphics.common@1.2-vts.spec",
+ hidl_gen_args: "-r android.hardware:hardware/interfaces",
+ srcs: [
+ ":android.hardware.graphics.common@1.2_hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.2/types.vts",
+ ],
+}
+
+// Build VTS driver.
+genrule {
+ name: "android.hardware.graphics.common@1.2-vts.driver_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.2 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.2/ $(genDir)/android/hardware/graphics/common/1.2/",
+ srcs: [
+ ":android.hardware.graphics.common@1.2_hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.2/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.common@1.2-vts.driver_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.2 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/common/1.2/ $(genDir)/android/hardware/graphics/common/1.2/",
+ srcs: [
+ ":android.hardware.graphics.common@1.2_hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.2/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.common@1.2-vts.driver",
+ generated_sources: ["android.hardware.graphics.common@1.2-vts.driver_genc++"],
+ generated_headers: ["android.hardware.graphics.common@1.2-vts.driver_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.common@1.2-vts.driver_genc++_headers"],
+ defaults: ["VtsHalDriverDefaults"],
+ shared_libs: [
+ "android.hardware.graphics.common@1.0-vts.driver",
+ "android.hardware.graphics.common@1.1-vts.driver",
+ ],
+ static_libs: [
+ "android.hardware.graphics.common@1.0",
+ "android.hardware.graphics.common@1.1",
+ "android.hardware.graphics.common@1.2",
+ ],
+}
+
+// Build VTS profiler.
+genrule {
+ name: "android.hardware.graphics.common@1.2-vts.profiler_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.2 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.2/ $(genDir)/android/hardware/graphics/common/1.2/",
+ srcs: [
+ ":android.hardware.graphics.common@1.2_hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.2/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.common@1.2-vts.profiler_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.graphics.common@1.2 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/common/1.2/ $(genDir)/android/hardware/graphics/common/1.2/",
+ srcs: [
+ ":android.hardware.graphics.common@1.2_hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.2/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.common@1.2-vts.profiler",
+ generated_sources: ["android.hardware.graphics.common@1.2-vts.profiler_genc++"],
+ generated_headers: ["android.hardware.graphics.common@1.2-vts.profiler_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.common@1.2-vts.profiler_genc++_headers"],
+ defaults: ["VtsHalProfilerDefaults"],
+ shared_libs: [
+ "android.hardware.graphics.common@1.0-vts.profiler",
+ "android.hardware.graphics.common@1.1-vts.profiler",
+ ],
+ static_libs: [
+ "android.hardware.graphics.common@1.0",
+ "android.hardware.graphics.common@1.1",
+ "android.hardware.graphics.common@1.2",
+ ],
+}
+
diff --git a/graphics/composer/V2_3/build/Android.bp b/graphics/composer/V2_3/build/Android.bp
index c3c81d8..deb7e47 100644
--- a/graphics/composer/V2_3/build/Android.bp
+++ b/graphics/composer/V2_3/build/Android.bp
@@ -50,12 +50,14 @@
shared_libs: [
"android.hardware.graphics.common@1.0-vts.driver",
"android.hardware.graphics.common@1.1-vts.driver",
+ "android.hardware.graphics.common@1.2-vts.driver",
"android.hardware.graphics.composer@2.1-vts.driver",
"android.hardware.graphics.composer@2.2-vts.driver",
],
static_libs: [
"android.hardware.graphics.common@1.0",
"android.hardware.graphics.common@1.1",
+ "android.hardware.graphics.common@1.2",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.3",
@@ -98,12 +100,14 @@
shared_libs: [
"android.hardware.graphics.common@1.0-vts.profiler",
"android.hardware.graphics.common@1.1-vts.profiler",
+ "android.hardware.graphics.common@1.2-vts.profiler",
"android.hardware.graphics.composer@2.1-vts.profiler",
"android.hardware.graphics.composer@2.2-vts.profiler",
],
static_libs: [
"android.hardware.graphics.common@1.0",
"android.hardware.graphics.common@1.1",
+ "android.hardware.graphics.common@1.2",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.3",
diff --git a/keymaster/V3_0/target_replay/AndroidTest.xml b/keymaster/V3_0/target_replay/AndroidTest.xml
index 1ad3960..d308ebc 100644
--- a/keymaster/V3_0/target_replay/AndroidTest.xml
+++ b/keymaster/V3_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/keymaster/3.0/vts/KeymasterDevice.vts->/data/local/tmp/spec/android/hardware/keymaster/3.0/KeymasterDevice.vts"/>
<option name="push" value="spec/hardware/interfaces/keymaster/3.0/vts/types.vts->/data/local/tmp/spec/android/hardware/keymaster/3.0/types.vts"/>
diff --git a/light/V2_0/target_replay/AndroidTest.xml b/light/V2_0/target_replay/AndroidTest.xml
index 3924899..6523bef 100644
--- a/light/V2_0/target_replay/AndroidTest.xml
+++ b/light/V2_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/light/2.0/vts/Light.vts->/data/local/tmp/spec/android/hardware/light/2.0/Light.vts"/>
<option name="push" value="spec/hardware/interfaces/light/2.0/vts/types.vts->/data/local/tmp/spec/android/hardware/light/2.0/types.vts"/>
diff --git a/memtrack/V1_0/target_replay/AndroidTest.xml b/memtrack/V1_0/target_replay/AndroidTest.xml
index 36155a6..f891595 100644
--- a/memtrack/V1_0/target_replay/AndroidTest.xml
+++ b/memtrack/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/memtrack/1.0/vts/Memtrack.vts->/data/local/tmp/spec/android/hardware/memtrack/1.0/Memtrack.vts"/>
<option name="push" value="spec/hardware/interfaces/memtrack/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/memtrack/1.0/types.vts"/>
diff --git a/neuralnetworks/V1_0/target/AndroidTest.xml b/neuralnetworks/V1_0/target/AndroidTest.xml
index 61416f4..1c7617e 100644
--- a/neuralnetworks/V1_0/target/AndroidTest.xml
+++ b/neuralnetworks/V1_0/target/AndroidTest.xml
@@ -25,5 +25,6 @@
<option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNeuralnetworksV1_0TargetTest/VtsHalNeuralnetworksV1_0TargetTest"/>
<option name="binary-test-type" value="hal_hidl_gtest"/>
<option name="test-timeout" value="5m"/>
+ <option name="gtest-batch-mode" value="true"/>
</test>
</configuration>
diff --git a/neuralnetworks/V1_1/target/AndroidTest.xml b/neuralnetworks/V1_1/target/AndroidTest.xml
index 296f475..672c627 100644
--- a/neuralnetworks/V1_1/target/AndroidTest.xml
+++ b/neuralnetworks/V1_1/target/AndroidTest.xml
@@ -25,6 +25,7 @@
<option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalNeuralnetworksV1_1TargetTest/VtsHalNeuralnetworksV1_1TargetTest"/>
<option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalNeuralnetworksV1_1TargetTest/VtsHalNeuralnetworksV1_1TargetTest"/>
<option name="binary-test-type" value="hal_hidl_gtest"/>
- <option name="test-timeout" value="5m"/>
+ <option name="test-timeout" value="7m"/>
+ <option name="gtest-batch-mode" value="true"/>
</test>
</configuration>
diff --git a/nfc/V1_0/target_replay/AndroidTest.xml b/nfc/V1_0/target_replay/AndroidTest.xml
index 3e5f2a3..65dcfa2 100644
--- a/nfc/V1_0/target_replay/AndroidTest.xml
+++ b/nfc/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/Nfc.vts->/data/local/tmp/spec/android/hardware/nfc/1.0/Nfc.vts"/>
<option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts->/data/local/tmp/spec/android/hardware/nfc/1.0/NfcClientCallback.vts"/>
diff --git a/power/V1_0/target_replay/AndroidTest.xml b/power/V1_0/target_replay/AndroidTest.xml
index 74309e4..1a1b151 100644
--- a/power/V1_0/target_replay/AndroidTest.xml
+++ b/power/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/power/1.0/vts/Power.vts->/data/local/tmp/spec/android/hardware/power/1.0/Power.vts"/>
<option name="push" value="spec/hardware/interfaces/power/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/power/1.0/types.vts"/>
diff --git a/script/build/build_rule_gen.py b/script/build/build_rule_gen.py
index c8f6b6e..14f7da8 100755
--- a/script/build/build_rule_gen.py
+++ b/script/build/build_rule_gen.py
@@ -52,12 +52,19 @@
Args:
test_config_dir: string, directory storing the configurations.
+
+ Returns:
+ a list of strings where each string contains the path of a checked
+ or updated build file.
+ True if any file is updated, False otherwise
"""
- utils.RemoveFilesInDirIf(
- os.path.join(self._ANDROID_BUILD_TOP, test_config_dir),
- lambda x: self._IsAutoGenerated(x))
hal_list = self._vts_spec_parser.HalNamesAndVersions()
- self.UpdateHalDirBuildRule(hal_list, test_config_dir)
+ gen_file_paths, updated_file_paths, updated = self.UpdateHalDirBuildRule(
+ hal_list, test_config_dir)
+ updated |= utils.RemoveFilesInDirIf(
+ os.path.join(self._ANDROID_BUILD_TOP, test_config_dir),
+ lambda x: self._IsAutoGenerated(x) and (x not in gen_file_paths))
+ return updated_file_paths, updated
def UpdateHalDirBuildRule(self, hal_list, test_config_dir):
"""Updates build rules for vts drivers/profilers.
@@ -69,7 +76,17 @@
hal_list: list of tuple of strings. For example,
[('vibrator', '1.3'), ('sensors', '1.7')]
test_config_dir: string, directory storing the configurations.
+
+ Returns:
+ a list of strings where each string contains the path of a checked
+ build file,
+ a list of strings where each string contains the path of an updated
+ build file,
+ boolean, True if any file is updated, False otherwise
"""
+ checked_file_paths = []
+ updated_file_paths = []
+ ever_updated = False
for target in hal_list:
hal_name = target[0]
hal_version = target[1]
@@ -79,8 +96,13 @@
utils.HalNameDir(hal_name), utils.HalVerDir(hal_version))
file_path = os.path.join(hal_dir, 'build', 'Android.bp')
- utils.WriteBuildRule(file_path, self._VtsBuildRuleFromTemplate(
+ updated = utils.WriteBuildRule(file_path, self._VtsBuildRuleFromTemplate(
self._VTS_BUILD_TEMPLATE, hal_name, hal_version))
+ checked_file_paths.append(file_path)
+ if updated:
+ updated_file_paths.append(file_path)
+ ever_updated = True
+ return checked_file_paths, updated_file_paths, ever_updated
def _VtsBuildRuleFromTemplate(self, template_path, hal_name, hal_version):
"""Returns build rules in string form by filling out a template.
diff --git a/script/build/build_rule_gen_utils.py b/script/build/build_rule_gen_utils.py
index 29462e9..94bbb9f 100644
--- a/script/build/build_rule_gen_utils.py
+++ b/script/build/build_rule_gen_utils.py
@@ -36,15 +36,28 @@
Args:
file_path: string, path to file to which to write.
build_rule: string, build rule to be written into file.
- """
- print 'Updating %s' % file_path
- dir_path = os.path.dirname(file_path)
+ Returns:
+ True if updated, False otherwise
+ """
+ exist = True
+ dir_path = os.path.dirname(file_path)
if not os.path.exists(dir_path):
os.makedirs(dir_path)
+ exist = False
+ elif not os.path.isfile(file_path):
+ exist = False
+ if exist:
+ with open(file_path, 'r') as existing_file:
+ if build_rule == existing_file.read():
+ print 'Skipping %s' % file_path
+ return False
+
+ print 'Updating %s' % file_path
with open(file_path, 'w') as bp_file:
bp_file.write(build_rule)
+ return True
def OnlySubdirsBpRule(warning_header, subdirs):
@@ -64,6 +77,7 @@
result += ']\n'
return result
+
def RemoveFilesInDirIf(dir_path, condition):
"""Removes all files under directory under given condition.
@@ -71,9 +85,16 @@
dir_path: string, path to directory
condition: boolean function takes absolute file path,
returns True iff file needs to be removed.
+
+ Returns:
+ True if removed, False otherwise
"""
+ removed = False
for base, _, files in os.walk(dir_path):
for f in files:
abs_path = os.path.join(base, f)
if condition(abs_path):
+ print "Removing", abs_path
os.remove(abs_path)
+ removed = True
+ return removed
diff --git a/script/update_makefiles.py b/script/update_makefiles.py
index a84b666..c905a24 100755
--- a/script/update_makefiles.py
+++ b/script/update_makefiles.py
@@ -28,6 +28,7 @@
"""
import argparse
import re
+import sys
from build.build_rule_gen import BuildRuleGen
from utils.const import Constant
@@ -55,7 +56,18 @@
sys.exit(1)
package_name, version = args.hal_package_name.split('@')
hal_list = [(package_name, version)]
- build_rule_gen.UpdateHalDirBuildRule(hal_list,
- Constant.VTS_HAL_TEST_CASE_PATH)
+ _, updated_files, updated = build_rule_gen.UpdateHalDirBuildRule(
+ hal_list, Constant.VTS_HAL_TEST_CASE_PATH)
else:
- build_rule_gen.UpdateBuildRule(Constant.VTS_HAL_TEST_CASE_PATH)
+ updated_files, updated = build_rule_gen.UpdateBuildRule(
+ Constant.VTS_HAL_TEST_CASE_PATH)
+ if updated:
+ print "ERROR: At least one file was not up-to-date and is updated now."
+ print "Please do the following before redoing repo upload ."
+ print "$ cd $ANDROID_BUILD_TOP/test/vts-testcase/hal"
+ for updated_file in updated_files:
+ print "$ git add %s" % updated_file
+ print "$ git commit"
+ print "$ repo upload"
+ sys.exit(-1)
+
diff --git a/thermal/V1_0/target_replay/AndroidTest.xml b/thermal/V1_0/target_replay/AndroidTest.xml
index e30d598..05d8ff8 100644
--- a/thermal/V1_0/target_replay/AndroidTest.xml
+++ b/thermal/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-misc" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/thermal/1.0/vts/Thermal.vts->/data/local/tmp/spec/android/hardware/thermal/1.0/Thermal.vts"/>
<option name="push" value="spec/hardware/interfaces/thermal/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/thermal/1.0/types.vts"/>
diff --git a/thermal/V2_0/build/Android.bp b/thermal/V2_0/build/Android.bp
new file mode 100644
index 0000000..1fb5f32
--- /dev/null
+++ b/thermal/V2_0/build/Android.bp
@@ -0,0 +1,105 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+ name: "android.hardware.thermal@2.0-vts.spec",
+ hidl_gen_args: "-r android.hardware:hardware/interfaces",
+ srcs: [
+ ":android.hardware.thermal@2.0_hal",
+ ],
+ out: [
+ "android/hardware/thermal/2.0/Thermal.vts",
+ "android/hardware/thermal/2.0/ThermalChangedCallback.vts",
+ "android/hardware/thermal/2.0/types.vts",
+ ],
+}
+
+// Build VTS driver.
+genrule {
+ name: "android.hardware.thermal@2.0-vts.driver_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/thermal/2.0/ $(genDir)/android/hardware/thermal/2.0/",
+ srcs: [
+ ":android.hardware.thermal@2.0_hal",
+ ],
+ out: [
+ "android/hardware/thermal/2.0/Thermal.vts.cpp",
+ "android/hardware/thermal/2.0/ThermalChangedCallback.vts.cpp",
+ "android/hardware/thermal/2.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.thermal@2.0-vts.driver_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/thermal/2.0/ $(genDir)/android/hardware/thermal/2.0/",
+ srcs: [
+ ":android.hardware.thermal@2.0_hal",
+ ],
+ out: [
+ "android/hardware/thermal/2.0/Thermal.vts.h",
+ "android/hardware/thermal/2.0/ThermalChangedCallback.vts.h",
+ "android/hardware/thermal/2.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.thermal@2.0-vts.driver",
+ generated_sources: ["android.hardware.thermal@2.0-vts.driver_genc++"],
+ generated_headers: ["android.hardware.thermal@2.0-vts.driver_genc++_headers"],
+ export_generated_headers: ["android.hardware.thermal@2.0-vts.driver_genc++_headers"],
+ defaults: ["VtsHalDriverDefaults"],
+ shared_libs: [
+ "android.hardware.thermal@1.0-vts.driver",
+ ],
+ static_libs: [
+ "android.hardware.thermal@1.0",
+ "android.hardware.thermal@2.0",
+ ],
+}
+
+// Build VTS profiler.
+genrule {
+ name: "android.hardware.thermal@2.0-vts.profiler_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/thermal/2.0/ $(genDir)/android/hardware/thermal/2.0/",
+ srcs: [
+ ":android.hardware.thermal@2.0_hal",
+ ],
+ out: [
+ "android/hardware/thermal/2.0/Thermal.vts.cpp",
+ "android/hardware/thermal/2.0/ThermalChangedCallback.vts.cpp",
+ "android/hardware/thermal/2.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.thermal@2.0-vts.profiler_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.thermal@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/thermal/2.0/ $(genDir)/android/hardware/thermal/2.0/",
+ srcs: [
+ ":android.hardware.thermal@2.0_hal",
+ ],
+ out: [
+ "android/hardware/thermal/2.0/Thermal.vts.h",
+ "android/hardware/thermal/2.0/ThermalChangedCallback.vts.h",
+ "android/hardware/thermal/2.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.thermal@2.0-vts.profiler",
+ generated_sources: ["android.hardware.thermal@2.0-vts.profiler_genc++"],
+ generated_headers: ["android.hardware.thermal@2.0-vts.profiler_genc++_headers"],
+ export_generated_headers: ["android.hardware.thermal@2.0-vts.profiler_genc++_headers"],
+ defaults: ["VtsHalProfilerDefaults"],
+ shared_libs: [
+ "android.hardware.thermal@1.0-vts.profiler",
+ ],
+ static_libs: [
+ "android.hardware.thermal@1.0",
+ "android.hardware.thermal@2.0",
+ ],
+}
+
diff --git a/thermal/V2_0/target/Android.mk b/thermal/V2_0/target/Android.mk
new file mode 100644
index 0000000..c0040ab
--- /dev/null
+++ b/thermal/V2_0/target/Android.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2018 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := VtsHalThermalV2_0Target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/thermal/V2_0/target/AndroidTest.xml b/thermal/V2_0/target/AndroidTest.xml
new file mode 100644
index 0000000..a418cb9
--- /dev/null
+++ b/thermal/V2_0/target/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.
+-->
+<configuration description="Config for VTS VtsHalThermalV2_0Target test cases">
+ <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HalHidlTargetTest.push"/>
+ </target_preparer>
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="VtsHalThermalV2_0Target"/>
+ <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalThermalV2_0TargetTest/VtsHalThermalV2_0TargetTest"/>
+ <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalThermalV2_0TargetTest/VtsHalThermalV2_0TargetTest"/>
+ <option name="binary-test-type" value="hal_hidl_gtest"/>
+ <option name="binary-test-disable-framework" value="true"/>
+ <option name="test-timeout" value="15m"/>
+ </test>
+</configuration>
diff --git a/treble/vintf/SingleManifestTest.cpp b/treble/vintf/SingleManifestTest.cpp
index ecd5a81..42acfc2 100644
--- a/treble/vintf/SingleManifestTest.cpp
+++ b/treble/vintf/SingleManifestTest.cpp
@@ -147,8 +147,8 @@
Partition partition = GetPartition(hal_service);
if (partition == Partition::UNKNOWN) return;
EXPECT_EQ(expected_partition, partition)
- << fq_name.string() << " is in partition " << partition
- << " but is expected to be in " << expected_partition;
+ << fq_name.string() << "/" << instance_name << " is in partition "
+ << partition << " but is expected to be in " << expected_partition;
};
};
diff --git a/usb/V1_0/target_replay/AndroidTest.xml b/usb/V1_0/target_replay/AndroidTest.xml
index 0a157b4..3dd8239 100644
--- a/usb/V1_0/target_replay/AndroidTest.xml
+++ b/usb/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/usb/1.0/vts/Usb.vts->/data/local/tmp/spec/android/hardware/usb/1.0/Usb.vts"/>
<option name="push" value="spec/hardware/interfaces/usb/1.0/vts/UsbCallback.vts->/data/local/tmp/spec/android/hardware/usb/1.0/UsbCallback.vts"/>
diff --git a/usb/gadget/V1_0/host/AndroidTest.xml b/usb/gadget/V1_0/host/AndroidTest.xml
index 6a7af1c..8e8e8a8 100644
--- a/usb/gadget/V1_0/host/AndroidTest.xml
+++ b/usb/gadget/V1_0/host/AndroidTest.xml
@@ -16,6 +16,7 @@
<configuration description="Config for VtsHalUsbGadgetV1_0Host test cases">
<option name="config-descriptor:metadata" key="plan" value="vts-staging-default" />
<option name="config-descriptor:metadata" key="plan" value="vts-hal-host" />
+ <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="push-group" value="HostDrivenTest.push" />
</target_preparer>
diff --git a/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py b/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py
index da9abb6..2be71cd 100644
--- a/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py
+++ b/usb/gadget/V1_0/host/VtsHalUsbGadgetV1_0HostTest.py
@@ -45,7 +45,7 @@
self.adb.wait_for_device()
except adb.AdbError as e:
logging.exception(e)
- self.serialno = self.adb.shell("\"getprop ro.serialno\"")
+ self.serialno = self.adb.shell("getprop ro.serialno")
def checkProtocol(self, usb_class, usb_sub_class, usb_protocol):
"""Queries the host USB bus to see if the interface is present.
diff --git a/vibrator/V1_0/target_replay/AndroidTest.xml b/vibrator/V1_0/target_replay/AndroidTest.xml
index 952aae1..664cac3 100644
--- a/vibrator/V1_0/target_replay/AndroidTest.xml
+++ b/vibrator/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/vibrator/1.0/vts/Vibrator.vts->/data/local/tmp/spec/android/hardware/vibrator/1.0/Vibrator.vts"/>
<option name="push" value="spec/hardware/interfaces/vibrator/1.0/vts/types.vts->/data/local/tmp/spec/android/hardware/vibrator/1.0/types.vts"/>
diff --git a/vr/V1_0/target_replay/AndroidTest.xml b/vr/V1_0/target_replay/AndroidTest.xml
index f4881f5..992734c 100644
--- a/vr/V1_0/target_replay/AndroidTest.xml
+++ b/vr/V1_0/target_replay/AndroidTest.xml
@@ -17,7 +17,7 @@
<option name="config-descriptor:metadata" key="plan" value="vts-hal-replay" />
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
<option name="abort-on-push-failure" value="false"/>
- <option name="push-group" value="HalHidlHostTest.push"/>
+ <option name="push-group" value="VtsHalReplayTest.push"/>
<option name="cleanup" value="true"/>
<option name="push" value="spec/hardware/interfaces/vr/1.0/vts/Vr.vts->/data/local/tmp/spec/android/hardware/vr/1.0/Vr.vts"/>
<option name="push" value="DATA/lib/android.hardware.vr@1.0-vts.driver.so->/data/local/tmp/32/android.hardware.vr@1.0-vts.driver.so"/>
diff --git a/wifi/V1_3/build/Android.bp b/wifi/V1_3/build/Android.bp
index 636d263..f201c9d 100644
--- a/wifi/V1_3/build/Android.bp
+++ b/wifi/V1_3/build/Android.bp
@@ -10,6 +10,7 @@
],
out: [
"android/hardware/wifi/1.3/Wifi.vts",
+ "android/hardware/wifi/1.3/WifiChip.vts",
"android/hardware/wifi/1.3/WifiStaIface.vts",
"android/hardware/wifi/1.3/types.vts",
],
@@ -25,6 +26,7 @@
],
out: [
"android/hardware/wifi/1.3/Wifi.vts.cpp",
+ "android/hardware/wifi/1.3/WifiChip.vts.cpp",
"android/hardware/wifi/1.3/WifiStaIface.vts.cpp",
"android/hardware/wifi/1.3/types.vts.cpp",
],
@@ -39,6 +41,7 @@
],
out: [
"android/hardware/wifi/1.3/Wifi.vts.h",
+ "android/hardware/wifi/1.3/WifiChip.vts.h",
"android/hardware/wifi/1.3/WifiStaIface.vts.h",
"android/hardware/wifi/1.3/types.vts.h",
],
@@ -73,6 +76,7 @@
],
out: [
"android/hardware/wifi/1.3/Wifi.vts.cpp",
+ "android/hardware/wifi/1.3/WifiChip.vts.cpp",
"android/hardware/wifi/1.3/WifiStaIface.vts.cpp",
"android/hardware/wifi/1.3/types.vts.cpp",
],
@@ -87,6 +91,7 @@
],
out: [
"android/hardware/wifi/1.3/Wifi.vts.h",
+ "android/hardware/wifi/1.3/WifiChip.vts.h",
"android/hardware/wifi/1.3/WifiStaIface.vts.h",
"android/hardware/wifi/1.3/types.vts.h",
],