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

Commit 96fbabdb authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge changes I16a7e7f7,Idb86d433

* changes:
  [PANDORA_TEST] pts-bot HFP Coverage: PSI
  [Pandora] - Add shell functionality
parents 632ec8ad 4d4e21e5
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -108,3 +108,25 @@ class HFPProxy(ProfileProxy):

        self.hfp.DisableSlc(connection=self.connection)
        return "OK"

    @assert_description
    def TSC_make_battery_charged(self, **kwargs):
        """
        Click Ok, then manipulate the Implementation Under Test (IUT) so that
        the battery is fully charged.
        """

        self.hfp.SetBatteryLevel(connection=self.connection, battery_percentage=100)

        return "OK"

    @assert_description
    def TSC_make_battery_discharged(self, **kwargs):
        """
        Manipulate the Implementation Under Test (IUT) so that the battery level
        is not fully charged, then click Ok.
        """

        self.hfp.SetBatteryLevel(connection=self.connection, battery_percentage=42)

        return "OK"
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,10 @@
        <option name="install-arg" value="-g" />
    </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.RunHostCommandTargetPreparer">
        <option name="host-background-command" value="adb -s $SERIAL shell am instrument --no-hidden-api-checks -w com.android.pandora/.Main" />
    </target_preparer>
@@ -30,6 +34,7 @@
        <option name="profile" value="GATT/CL/GAW" />
        <option name="profile" value="HFP/AG/DIS" />
        <option name="profile" value="HFP/AG/HFI" />
        <option name="profile" value="HFP/AG/PSI" />
        <option name="profile" value="HFP/AG/SLC" />
        <option name="profile" value="HFP/AG/TCA" />
        <option name="profile" value="HID/HOS" />
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,10 @@
        <option name="install-arg" value="-g" />
    </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.RunHostCommandTargetPreparer">
        <option name="host-background-command" value="adb -s $SERIAL shell am instrument --no-hidden-api-checks -w com.android.pandora/.Main" />
    </target_preparer>
@@ -30,6 +34,7 @@
        <option name="profile" value="GATT/CL/GAW" />
        <option name="profile" value="HFP/AG/DIS" />
        <option name="profile" value="HFP/AG/HFI" />
        <option name="profile" value="HFP/AG/PSI" />
        <option name="profile" value="HFP/AG/SLC" />
        <option name="profile" value="HFP/AG/TCA" />
        <option name="profile" value="SDP/SR" />
+5 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@
    "GATT/CL/GAW/BV-05-C",
    "GATT/CL/GAW/BV-08-C",
    "GATT/CL/GAW/BV-09-C",
    "HFP/AG/PSI/BV-03-C",
    "HID/HOS/DAT/BV-01-C",
    "HID/HOS/HCE/BV-01-I",
    "HID/HOS/HCE/BV-03-I",
@@ -269,6 +270,10 @@
    "HFP/AG/DIS/BV-01-I",
    "HFP/AG/HFI/BI-03-I",
    "HFP/AG/HFI/BV-02-I",
    "HFP/AG/PSI/BV-01-C",
    "HFP/AG/PSI/BV-02-C",
    "HFP/AG/PSI/BV-04-I",
    "HFP/AG/PSI/BV-05-I",
    "HFP/AG/SLC/BV-01-C",
    "HFP/AG/SLC/BV-02-C",
    "HFP/AG/SLC/BV-03-C",
+10 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ service HFP {
  rpc EnableSlc(EnableSlcRequest) returns (google.protobuf.Empty);
  // Disable Service level connection
  rpc DisableSlc(DisableSlcRequest) returns (google.protobuf.Empty);
  // Change the battery level to the one requested
  rpc SetBatteryLevel(SetBatteryLevelRequest) returns (google.protobuf.Empty);
}

// Request of the `EnableSlc` method.
@@ -26,3 +28,11 @@ message DisableSlcRequest {
  // Connection crafted by grpc server
  Connection connection = 1;
}

// Request of the `SetBatteryLevel` method.
message SetBatteryLevelRequest {
  // Connection crafted by grpc server
  Connection connection = 1;
  // Battery level to be set on the DUT
  int32 battery_percentage = 2;
}
Loading