Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12864dcb authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9321341 from 4293b48e to tm-qpr2-release

Change-Id: Id094b9e87b244c466b65c88cd1d937720f9f4cde
parents 7c0d9efc 4293b48e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -39,5 +39,6 @@
  <object type="module_controller"
          class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
      <option name="mainline-module-package-name" value="com.android.btservices" />
      <option name="mainline-module-package-name" value="com.google.android.btservices" />
  </object>
</configuration>
+14 −5
Original line number Diff line number Diff line
@@ -2,11 +2,8 @@ package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_test {
    name: "BluetoothInstrumentationTests",

    // We only want this apk build for tests.
    certificate: ":com.android.bluetooth.certificate",
java_defaults {
    name: "BluetoothInstrumentationTestsDefaults",
    defaults: ["framework-bluetooth-tests-defaults"],

    min_sdk_version: "current",
@@ -51,3 +48,15 @@ android_test {

    instrumentation_for: "Bluetooth",
}

android_test {
    name: "BluetoothInstrumentationTests",
    defaults: ["BluetoothInstrumentationTestsDefaults"],
}

android_test {
    name: "GoogleBluetoothInstrumentationTests",
    defaults: ["BluetoothInstrumentationTestsDefaults"],
    test_config: "GoogleAndroidTest.xml",
    instrumentation_target_package: "com.google.android.bluetooth",
}
+1 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.bluetooth.tests"
          android:sharedUserId="android.uid.bluetooth">
          package="com.android.bluetooth.tests">

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" />
+7 −3
Original line number Diff line number Diff line
@@ -24,10 +24,11 @@
        <option name="force-root" value="true" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="throw-if-cmd-fail" value="true" />
        <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
        <option name="run-command" value="su u$(am get-current-user)_system svc bluetooth disable" />
        <option name="run-command" value="cmd bluetooth_manager disable" />
        <option name="run-command" value="setprop bluetooth.profile.hfp.hf.enabled true" />
        <option name="teardown-command" value="su u$(am get-current-user)_system svc bluetooth enable" />
        <option name="teardown-command" value="cmd bluetooth_manager enable" />
        <option name="teardown-command" value="settings put global ble_scan_always_enabled 1" />
        <option name="teardown-command" value="setprop bluetooth.profile.hfp.hf.enabled false" />
    </target_preparer>
@@ -37,7 +38,10 @@
    <option name="test-tag" value="BluetoothInstrumentationTests" />
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.bluetooth.tests" />
        <option name="test-filter-dir" value="/data/data/{PACKAGE}/cache" />
        <!-- include and exclude filters go into /data/local/tmp/ajur/ by default
             However it's prohibited for access by system uid packages.
             So instead we use the app cache folder for filter -->
        <option name="test-filter-dir" value="/data/data/com.android.bluetooth/cache" />
        <option name="hidden-api-checks" value="false"/>
    </test>

+52 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 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="Runs Bluetooth Test Cases.">
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-instrumentation" />
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="GoogleBluetoothInstrumentationTests.apk" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
        <option name="force-root" value="true" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="throw-if-cmd-fail" value="true" />
        <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
        <option name="run-command" value="cmd bluetooth_manager disable" />
        <option name="run-command" value="setprop bluetooth.profile.hfp.hf.enabled true" />
        <option name="teardown-command" value="cmd bluetooth_manager enable" />
        <option name="teardown-command" value="settings put global ble_scan_always_enabled 1" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.FolderSaver">
        <option name="device-path" value="/data/vendor/ssrdump" />
    </target_preparer>
    <option name="test-tag" value="GoogleBluetoothInstrumentationTests" />
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.bluetooth.tests" />
        <!-- include and exclude filters go into /data/local/tmp/ajur/ by default
             However it's prohibited for access by system uid packages.
             So instead we use the app cache folder for filter -->
        <option name="test-filter-dir" value="/data/data/com.google.android.bluetooth/cache" />
        <option name="hidden-api-checks" value="false"/>
    </test>

    <!-- Only run Cts Tests in MTS if the Bluetooth Mainline module is installed. -->
    <object type="module_controller"
            class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
        <option name="mainline-module-package-name" value="com.google.android.btservices" />
    </object>
</configuration>
Loading