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

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

Merge changes from topic "pandora"

* changes:
  Pandora: Rename all references of Blueberry to Pandora
  Pandora: Rename Blueberry folder to Pandora
parents 64dc9fd9 3137afe1
Loading
Loading
Loading
Loading
+0 −0

File moved.

+11 −11
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ package {
}

android_test_helper_app {
    name: "BlueberryServer",
    name: "PandoraServer",
    srcs: ["src/**/*.kt"],
    platform_apis: true,
    certificate: "platform",
@@ -16,8 +16,8 @@ android_test_helper_app {
        "guava",
        "opencensus-java-api",
        "kotlinx_coroutines",
        "blueberry-grpc-java",
        "blueberry-proto-java",
        "pandora-grpc-java",
        "pandora-proto-java",
        "opencensus-java-contrib-grpc-metrics",
    ],

@@ -31,19 +31,19 @@ android_test_helper_app {

android_test {
    name: "pts-bot",
    required: ["BlueberryServer"],
    required: ["PandoraServer"],
    test_config: "configs/PtsBotTest.xml",
    data: ["configs/pts_bot_tests_config.json"],
}

java_library {
    name: "blueberry-grpc-java",
    name: "pandora-grpc-java",
    visibility: ["//visibility:private"],
    srcs: [
        "proto/blueberry/*.proto",
        "proto/pandora/*.proto",
    ],
    static_libs: [
        "blueberry-proto-java",
        "pandora-proto-java",
        "grpc-java-lite",
        "guava",
        "opencensus-java-api",
@@ -52,7 +52,7 @@ java_library {
    ],
    proto: {
        include_dirs: [
            "packages/modules/Bluetooth/android/blueberry/server/proto",
            "packages/modules/Bluetooth/android/pandora/server/proto",
            "external/protobuf/src",
        ],
        plugin: "grpc-java-plugin",
@@ -63,10 +63,10 @@ java_library {
}

java_library {
    name: "blueberry-proto-java",
    name: "pandora-proto-java",
    visibility: ["//visibility:private"],
    srcs: [
        "proto/blueberry/*.proto",
        "proto/pandora/*.proto",
        ":libprotobuf-internal-protos",
    ],
    static_libs: [
@@ -75,7 +75,7 @@ java_library {
    proto: {
        type: "lite",
        include_dirs: [
            "packages/modules/Bluetooth/android/blueberry/server/proto",
            "packages/modules/Bluetooth/android/pandora/server/proto",
            "external/protobuf/src",
        ],
    },
+4 −4
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.blueberry">
    package="com.android.pandora">

    <application>
        <uses-library android:name="android.test.runner" />
@@ -27,7 +27,7 @@
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.LOCAL_MAC_ADDRESS" />

    <instrumentation android:name="com.android.blueberry.Main"
                     android:targetPackage="com.android.blueberry"
                     android:label="Blueberry Android Server" />
    <instrumentation android:name="com.android.pandora.Main"
                     android:targetPackage="com.android.pandora"
                     android:label="Pandora Android Server" />
</manifest>
+14 −14
Original line number Diff line number Diff line
# Blueberry Android server
# Pandora Android server

The Blueberry Android server exposes the [Blueberry test interfaces](
go/blueberry-doc) over gRPC implemented on top of the Android Bluetooth SDK.
The Pandora Android server exposes the [Pandora test interfaces](
go/pandora-doc) over gRPC implemented on top of the Android Bluetooth SDK.

## Getting started

Using Blueberry Android server requires to:
Using Pandora Android server requires to:

* Build AOSP for your DUT, which can be either a physical device or an Android
  Virtual Device (AVD).
* [Only for virtual tests] Build Rootcanal, the Android
  virtual Bluetooth Controller.
* Setup your test environment.
* Build, install, and run Blueberry server.
* Build, install, and run Pandora server.
* Run your tests.

### 1. Build and run AOSP code
@@ -62,25 +62,25 @@ with the following steps to setup the test environment:
    `adb forward tcp:<rootcanal-port> tcp:<rootcanal-port>`.
    Rootcanal port number may differ depending on its configuration. It is
    7200 for the AVD, and generally 6211 for physical devices.
* Forward Blueberry Android server port through ADB:
* Forward Pandora Android server port through ADB:
  `adb forward tcp:8999 tcp:8999`.

The above steps can be done by executing the `setup.sh` helper script (the
`-rootcanal` option must be used for virtual tests on a physical device).

Finally, you must also make sure that the machine on which tests are executed
can access the ports of the Blueberry Android server, Rootcanal (if required),
can access the ports of the Pandora Android server, Rootcanal (if required),
and ADB (if required).

You can also check the usage examples provided below.

### 4. Build, install, and run Blueberry Android server
### 4. Build, install, and run Pandora Android server

* `m BlueberryServer`
* `adb install -r -g out/target/product/<device>/testcases/Blueberry/arm64/Blueberry.apk`
* `m PandoraServer`
* `adb install -r -g out/target/product/<device>/testcases/Pandora/arm64/Pandora.apk`

* Start the instrumented app:
* `adb shell am instrument -w -e Debug false com.android.blueberry/.Server`
* `adb shell am instrument -w -e Debug false com.android.pandora/.Server`

### 5. Run your tests

@@ -93,13 +93,13 @@ Here are some usage examples:
* **DUT**: physical
  **Test type**: virtual
  **Test executer**: remote instance (for instance a Cloudtop) accessed via SSH
  **Blueberry Android server repository location**: local machine (typically
  **Pandora Android server repository location**: local machine (typically
  using Android Studio)

  * On your local machine: `./setup.sh --rootcanal`.
  * On your local machine: build and install the app on your DUT.
  * Log on your remote instance, and forward Rootcanal port (6211, may change
    depending on your build) and Blueberry Android server (8999) port:
    depending on your build) and Pandora Android server (8999) port:
    `ssh -R 6211:localhost:6211 -R 8999:localhost:8999 <remote-instance>`.
    Optionnally, you can also share ADB port to your remote instance (if
    needed) by adding `-R 5037:localhost:5037` to the command.
@@ -108,7 +108,7 @@ Here are some usage examples:
* **DUT**: virtual (running in remote instance)
  **Test type**: virtual
  **Test executer**: remote instance
  **Blueberry Android server repository location**: remote instance
  **Pandora Android server repository location**: remote instance

  On your remote instance:
  * `./setup.sh`.
+3 −3
Original line number Diff line number Diff line
<configuration description="Runs PTS-bot tests">

    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="test-file-name" value="BlueberryServer.apk" />
        <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.InstallApkSetup">
        <option name="post-install-cmd" value="am instrument -e Debug false com.android.blueberry/.Main" />
        <option name="post-install-cmd" value="am instrument -e Debug false com.android.pandora/.Main" />
    </target_preparer>

    <test class="com.android.tradefed.testtype.blueberry.PtsBotTest" >
    <test class="com.android.tradefed.testtype.pandora.PtsBotTest" >
        <option name="mmi2grpc" value="empty" />
        <option name="tests-config-file" value="pts_bot_tests_config.json" />
        <option name="physical" value="false" />
Loading