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

Commit 9328cd81 authored by Charlie Boutier's avatar Charlie Boutier Committed by Gerrit Code Review
Browse files

Merge "Avatar: Add local setup rule" into main

parents fd273e4b 31478b86
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
    default_team: "trendy_team_bluetooth",
}

python_test_host {
@@ -44,6 +45,35 @@ python_test_host {
    ],
}

python_test_host {
    name: "avatar_phy",
    main: "main.py",
    srcs: [
        "**/*.py",
    ],
    test_config: "AndroidPhyTest.xml",
    version: {
        py3: {
            embedded_launcher: false,
        },
    },
    libs: [
        "bumble_services_experimental-python",
        "libavatar",
    ],
    required: [
        "aapt",
    ],
    test_suites: ["general-tests"],
    test_options: {
        unit_test: false,
    },
    data: [
        ":PandoraServer",
        "config.yml",
    ],
}

sh_binary_host {
    name: "avatar.sh",
    src: "avatar.sh",
+46 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2024 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="Avatar tests.">
    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
        <option name="force-root" value="true"/>
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="test-file-name" value="PandoraServer.apk" />
        <option name="install-arg" value="-r" />
        <option name="install-arg" value="-g" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command" value="cmd bluetooth_manager enable" />
        <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer">
        <option name="dep-module" value="grpcio==1.51.1" />
        <option name="dep-module" value="cryptography==35" />
        <option name="dep-module" value="numpy" />
        <option name="dep-module" value="pyusb" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
         <option name="set-property" key="persist.log.tag.bluetooth" value="VERBOSE"/>
         <option name="restore-properties" value="true"/>
    </target_preparer>
    <test class="com.android.tradefed.testtype.mobly.MoblyBinaryHostTest">
        <option name="mobly-par-file-name" value="avatar_phy" />
        <option name="mobly-config-file-name" value="config.yml" />
        <option name="mobly-test-timeout" value="1800000" />
        <option name="test-bed" value="phy" />
    </test>
</configuration>
+5 −0
Original line number Diff line number Diff line
@@ -13,3 +13,8 @@ TestBeds:
    - transport: 'tcp-client:127.0.0.1:7300'
    - transport: 'tcp-client:127.0.0.1:7300'
    - transport: 'tcp-client:127.0.0.1:7300'
- Name: phy
  Controllers:
      AndroidDevice: '*'
      BumbleDevice:
          - transport: 'pyusb:8087:0036'