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

Commit 98746056 authored by David Duarte's avatar David Duarte Committed by Gerrit Code Review
Browse files

Merge changes I91ce09f8,Ia08f1885,I7970a64b,I7399254a,Ib4beaa78, ...

* changes:
  Add Bluetooth android_test(s) into TEST_MAPPING
  BluetoothInstrumentationTests: Remove certificate
  BluetoothInstrumentationTests: Fix bluetooth service disable
  FrameworkBluetoothTests: Remove certificate
  Do not put apex updatable in qpr
  Make the btservices apex updatable.
parents 47ee811b 59a6c19a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -38,6 +38,6 @@
  <!-- Only run tests in MTS if the Bluetooth Mainline module is installed. -->
  <!-- Only run tests in MTS if the Bluetooth Mainline module is installed. -->
  <object type="module_controller"
  <object type="module_controller"
          class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
          class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
      <option name="mainline-module-package-name" value="com.google.android.bluetooth" />
      <option name="mainline-module-package-name" value="com.android.btservices" />
  </object>
  </object>
</configuration>
</configuration>
+44 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,50 @@
    },
    },
    {
    {
      "name" : "net_test_stack_btm"
      "name" : "net_test_stack_btm"
    },
    {
      "name" : "BluetoothInstrumentationTests",
      "options" : [{
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#eventHandler_handleMessage_MSG_CONNECT_TIMEOUT"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#eventHandler_handleMessage_MSG_SHARE_INTERRUPTED_batchFailed"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#eventHandler_handleMessage_TRANSPORT_ERROR_connectThreadIsNull"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#onBatchCanceled_checkStatus"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppUtilityTest#openReceivedFile_fileNotExist"
      }]
    },
    {
      "name" : "GoogleBluetoothInstrumentationTests",
      "options" : [{
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#eventHandler_handleMessage_MSG_CONNECT_TIMEOUT"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#eventHandler_handleMessage_MSG_SHARE_INTERRUPTED_batchFailed"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#eventHandler_handleMessage_TRANSPORT_ERROR_connectThreadIsNull"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppTransferTest#onBatchCanceled_checkStatus"
      }, {
        // b/259422308
        "exclude-filter" : "com.android.bluetooth.opp.BluetoothOppUtilityTest#openReceivedFile_fileNotExist"
      }]
    },
    {
      "name" : "FrameworkBluetoothTests"
    },
    {
      "name" : "ServiceBluetoothTests"
    }
    }
  ]
  ]
}
}
+14 −5
Original line number Original line Diff line number Diff line
@@ -2,11 +2,8 @@ package {
    default_applicable_licenses: ["Android-Apache-2.0"],
    default_applicable_licenses: ["Android-Apache-2.0"],
}
}


android_test {
java_defaults {
    name: "BluetoothInstrumentationTests",
    name: "BluetoothInstrumentationTestsDefaults",

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


    min_sdk_version: "current",
    min_sdk_version: "current",
@@ -52,3 +49,15 @@ android_test {


    instrumentation_for: "Bluetooth",
    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 Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<!-- 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"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.bluetooth.tests"
          package="com.android.bluetooth.tests">
          android:sharedUserId="android.uid.bluetooth">


    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" />
    <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" />
+8 −7
Original line number Original line Diff line number Diff line
@@ -24,10 +24,11 @@
        <option name="force-root" value="true" />
        <option name="force-root" value="true" />
    </target_preparer>
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
    <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="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="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="settings put global ble_scan_always_enabled 1" />
        <option name="teardown-command" value="setprop bluetooth.profile.hfp.hf.enabled false" />
        <option name="teardown-command" value="setprop bluetooth.profile.hfp.hf.enabled false" />
    </target_preparer>
    </target_preparer>
@@ -39,15 +40,15 @@
        <option name="package" value="com.android.bluetooth.tests" />
        <option name="package" value="com.android.bluetooth.tests" />
        <!-- include and exclude filters go into /data/local/tmp/ajur/ by default
        <!-- include and exclude filters go into /data/local/tmp/ajur/ by default
             However it's prohibited for access by system uid packages.
             However it's prohibited for access by system uid packages.
             So instead we use the test data folder for filter. This is applicable
             So instead we use the app cache folder for filter -->
             here as we are root. -->
        <option name="test-filter-dir" value="/data/data/com.android.bluetooth/cache" />
        <option name="test-filter-dir" value="/data/data/com.android.bluetooth.tests" />
        <option name="hidden-api-checks" value="false"/>
        <option name="hidden-api-checks" value="false"/>
    </test>
    </test>


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