summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Liu <steveliu@google.com>2024-04-09 17:11:53 +0000
committerSteven Liu <steveliu@google.com>2024-04-09 17:11:53 +0000
commit200bdd4889449c376af9bdd28bd30664e0a75e2d (patch)
tree0f1638bb29c3959e58653553819584b7856e014f
parenta398478e6c945fa0d995279666ee4c0348aeb0e0 (diff)
downloadplatform_testing-200bdd4889449c376af9bdd28bd30664e0a75e2d.tar.gz
correct the result message for the failure of 'prior BT' connection.
Bug: 333544187 Test: build Change-Id: Ia28ba2731b541f146ffa8098fa8d661c246c2a42
-rw-r--r--tests/bettertogether/betocq/d2d_performance_test_base.py22
-rw-r--r--tests/bettertogether/betocq/nc_constants.py7
2 files changed, 16 insertions, 13 deletions
diff --git a/tests/bettertogether/betocq/d2d_performance_test_base.py b/tests/bettertogether/betocq/d2d_performance_test_base.py
index 8d2ce0cf0..7322b0e96 100644
--- a/tests/bettertogether/betocq/d2d_performance_test_base.py
+++ b/tests/bettertogether/betocq/d2d_performance_test_base.py
@@ -441,6 +441,17 @@ class D2dPerformanceTestBase(nc_base_test.NCBaseTestClass, abc.ABC):
def _get_current_test_result_message(self) -> str:
if (
+ self._use_prior_bt
+ and self._prior_bt_nc_fail_reason
+ is not nc_constants.SingleTestFailureReason.SUCCESS
+ ):
+ return ''.join([
+ 'FAIL (The prior BT connection): ',
+ f'{self._prior_bt_nc_fail_reason.name} - ',
+ nc_constants.COMMON_TRIAGE_TIP.get(self._prior_bt_nc_fail_reason),
+ ])
+
+ if (
self._active_nc_fail_reason
== nc_constants.SingleTestFailureReason.SUCCESS
):
@@ -455,17 +466,6 @@ class D2dPerformanceTestBase(nc_base_test.NCBaseTestClass, abc.ABC):
])
if (
- self._use_prior_bt
- and self._prior_bt_nc_fail_reason
- is not nc_constants.SingleTestFailureReason.SUCCESS
- ):
- return ''.join([
- 'FAIL (The prior BT connection): ',
- f'{self._prior_bt_nc_fail_reason.name} - ',
- nc_constants.COMMON_TRIAGE_TIP.get(self._prior_bt_nc_fail_reason),
- ])
-
- if (
self._active_nc_fail_reason
is nc_constants.SingleTestFailureReason.WIFI_MEDIUM_UPGRADE
):
diff --git a/tests/bettertogether/betocq/nc_constants.py b/tests/bettertogether/betocq/nc_constants.py
index 5bfaa28ec..60380fbab 100644
--- a/tests/bettertogether/betocq/nc_constants.py
+++ b/tests/bettertogether/betocq/nc_constants.py
@@ -251,9 +251,12 @@ COMMON_TRIAGE_TIP: dict[SingleTestFailureReason, str] = {
'The target device can not start BLE advertising.'
),
SingleTestFailureReason.SOURCE_REQUEST_CONNECTION: (
- 'The source device can not connect to the target device.'),
+ 'The source device can not request connection to the target device'
+ ' through BLE.'
+ ),
SingleTestFailureReason.TARGET_ACCEPT_CONNECTION: (
- 'The target device can not accept the connection.'),
+ 'The target device can not accept the connection through BLE.'
+ ),
SingleTestFailureReason.SOURCE_WIFI_CONNECTION: (
'The source device can not connect to the wifi network. '
'1) Check if the wifi ssid or password is correct;'