[VTS][NAN] Fix VTS tests: didn't abort early enough for non-NAN devices

am: 1acc63f9cf

Change-Id: I7d306db29ebc8092e8e6bd99dd4836d457433b15
This commit is contained in:
Etan Cohen 2017-11-10 22:03:18 +00:00 committed by android-build-merger
commit ba01f8ff7a

View file

@ -441,8 +441,8 @@ TEST_F(WifiChipHidlTest, RemoveApIface) {
* succeeds. The 2nd iface creation should be rejected.
*/
TEST_F(WifiChipHidlTest, CreateNanIface) {
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
if (!gEnv->isNanOn) return;
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
sp<IWifiNanIface> iface;
ASSERT_EQ(WifiStatusCode::SUCCESS, createNanIface(&iface));
@ -458,8 +458,8 @@ TEST_F(WifiChipHidlTest, CreateNanIface) {
* iface name is returned via the list.
*/
TEST_F(WifiChipHidlTest, GetNanIfaceNames) {
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
if (!gEnv->isNanOn) return;
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
const auto& status_and_iface_names1 =
HIDL_INVOKE(wifi_chip_, getNanIfaceNames);
@ -491,8 +491,8 @@ TEST_F(WifiChipHidlTest, GetNanIfaceNames) {
* doesn't retrieve an iface object.
*/
TEST_F(WifiChipHidlTest, GetNanIface) {
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
if (!gEnv->isNanOn) return;
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
sp<IWifiNanIface> nan_iface;
EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));
@ -518,8 +518,8 @@ TEST_F(WifiChipHidlTest, GetNanIface) {
* doesn't remove the iface.
*/
TEST_F(WifiChipHidlTest, RemoveNanIface) {
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
if (!gEnv->isNanOn) return;
configureChipForIfaceType(IfaceType::NAN, gEnv->isNanOn);
sp<IWifiNanIface> nan_iface;
EXPECT_EQ(WifiStatusCode::SUCCESS, createNanIface(&nan_iface));