From ab4daa65c441ad644bcd4fbc5c0deb75e2f4ee36 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Wed, 12 May 2021 18:31:55 -0700 Subject: [PATCH] Skip tests for single SIM devices When device is configured as single SIM device, skip VTS on 2nd vendor radio service instance. Bug: 199986032 Test: atest VtsHalRadioV1_6TargetTest Merged-In: Ib634b22dd75f10e5059c9482764ca481184162be Change-Id: Ib634b22dd75f10e5059c9482764ca481184162be --- radio/1.0/vts/functional/vts_test_util.cpp | 7 +++++++ radio/1.0/vts/functional/vts_test_util.h | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/radio/1.0/vts/functional/vts_test_util.cpp b/radio/1.0/vts/functional/vts_test_util.cpp index 9a2d089899..5ab1a0eb12 100644 --- a/radio/1.0/vts/functional/vts_test_util.cpp +++ b/radio/1.0/vts/functional/vts_test_util.cpp @@ -81,6 +81,13 @@ bool deviceSupportsFeature(const char* feature) { return hasFeature; } +bool isSsSsEnabled() { + // Do not use checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "") + // until b/148904287 is fixed. We need exact matching instead of partial matching. (i.e. + // by definition the empty string "" is a substring of any string). + return !isDsDsEnabled() && !isTsTsEnabled(); +} + bool isDsDsEnabled() { return testing::checkSubstringInCommandOutput("getprop persist.radio.multisim.config", "dsds"); } diff --git a/radio/1.0/vts/functional/vts_test_util.h b/radio/1.0/vts/functional/vts_test_util.h index 218e8236b0..236a2cf017 100644 --- a/radio/1.0/vts/functional/vts_test_util.h +++ b/radio/1.0/vts/functional/vts_test_util.h @@ -64,12 +64,17 @@ int GetRandomSerialNumber(); bool deviceSupportsFeature(const char* feature); /* - * Check if device is in DSDS. + * Check if device is in SsSs (Single SIM Single Standby). + */ +bool isSsSsEnabled(); + +/* + * Check if device is in DSDS (Dual SIM Dual Standby). */ bool isDsDsEnabled(); /* - * Check if device is in TSTS. + * Check if device is in TSTS (Triple SIM Triple Standby). */ bool isTsTsEnabled();