Use the beta or dev build of BlueZ
Previously, we chose an older BlueZ beta build, R108-15183.71.0,
as a golden build for calculating the OSR and NSM values.
We are now selecting a newer BlueZ dev build, R117-15526.0.0, as
the new golden build to reflect the improved BlueZ test results.
This patch checks the availability of either the beta or dev
build and accordingly adopts it.
BUG=b:269681390, b:274698307
TEST=Run the unit tests.
Change-Id: I8951f3068b09b6fb81a60c42339dbea7473e1b65
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/bluetooth/+/4680433
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Dean Liao <deanliao@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Manish Mandlik <mmandlik@chromium.org>
Auto-Submit: Shyh-In Hwang <josephsih@chromium.org>
diff --git a/tools/floss_testing_nsm/nsm.py b/tools/floss_testing_nsm/nsm.py
index e5f416e..9114065 100755
--- a/tools/floss_testing_nsm/nsm.py
+++ b/tools/floss_testing_nsm/nsm.py
@@ -754,8 +754,15 @@
A dictionary of values about NSMs.
"""
# Only one OSR value exists in bluez_valid_osrs representing
- # the golden build, R108-15183.71.0, which is in the beta channel.
- bluez_golden_osr = bluez_valid_osrs[self.BETA][0]
+ # the golden build. There are two possibilities.
+ # - R108-15183.71.0, which is in the beta channel.
+ # - R117-15526.0.0, which is in the dev channel.
+ if bluez_valid_osrs[self.BETA]:
+ bluez_golden_osr = bluez_valid_osrs[self.BETA][0]
+ elif bluez_valid_osrs[self.DEV]:
+ bluez_golden_osr = bluez_valid_osrs[self.DEV][0]
+ else:
+ self.abort("Failed to find valid OSRs.")
floss_valid_osrs_dev = floss_valid_osrs[self.DEV]
floss_valid_osrs_beta = floss_valid_osrs[self.BETA]