Loading gnss/1.1/vts/functional/gnss_hal_test.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ void GnssHalTest::SetPositionMode(const int min_interval_msec, const bool low_po EXPECT_TRUE(result); } bool GnssHalTest::StartAndCheckFirstLocation() { bool GnssHalTest::StartAndCheckFirstLocation(bool strict) { auto result = gnss_hal_->start(); EXPECT_TRUE(result.isOk()); Loading @@ -119,7 +119,9 @@ bool GnssHalTest::StartAndCheckFirstLocation() { const int kFirstGnssLocationTimeoutSeconds = 75; wait(kFirstGnssLocationTimeoutSeconds); if (strict) { EXPECT_EQ(location_called_count_, 1); } if (location_called_count_ > 0) { // don't require speed on first fix Loading @@ -142,7 +144,7 @@ void GnssHalTest::StartAndCheckLocations(int count) { SetPositionMode(kMinIntervalMsec, kLowPowerMode); EXPECT_TRUE(StartAndCheckFirstLocation()); EXPECT_TRUE(StartAndCheckFirstLocation(/* strict= */ true)); for (int i = 1; i < count; i++) { EXPECT_EQ(std::cv_status::no_timeout, wait(kLocationTimeoutSubsequentSec)); Loading gnss/1.1/vts/functional/gnss_hal_test.h +3 −1 Original line number Diff line number Diff line Loading @@ -113,9 +113,11 @@ class GnssHalTest : public ::testing::VtsHalHidlTargetTestBase { * <p> Note this leaves the Location request active, to enable Stop call vs. other call * reordering tests. * * <p> if 'strict' is true, the test will fail if no location is generated. * * returns true if a location was successfully generated */ bool StartAndCheckFirstLocation(); bool StartAndCheckFirstLocation(bool strict); /* * CheckLocation: Loading gnss/1.1/vts/functional/gnss_hal_test_cases.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ TEST_F(GnssHalTest, GetLocationLowPower) { SetPositionMode(kMinIntervalMsec, kLowPowerMode); // Don't expect true - as without AGPS access if (!StartAndCheckFirstLocation()) { if (!StartAndCheckFirstLocation(/* strict= */ false)) { ALOGW("GetLocationLowPower test - no first low power location received."); } Loading gnss/2.0/vts/functional/gnss_hal_test.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ void GnssHalTest::SetPositionMode(const int min_interval_msec, const bool low_po EXPECT_TRUE(result); } bool GnssHalTest::StartAndCheckFirstLocation() { bool GnssHalTest::StartAndCheckFirstLocation(bool strict) { const auto result = gnss_hal_->start(); EXPECT_TRUE(result.isOk()); Loading @@ -104,12 +104,16 @@ bool GnssHalTest::StartAndCheckFirstLocation() { * so allow time to demodulate ephemeris over the air. */ const int kFirstGnssLocationTimeoutSeconds = 75; int locationCalledCount = 0; if (strict) { EXPECT_TRUE(gnss_cb_->location_cbq_.retrieve(gnss_cb_->last_location_, kFirstGnssLocationTimeoutSeconds)); int locationCalledCount = gnss_cb_->location_cbq_.calledCount(); EXPECT_EQ(locationCalledCount, 1); locationCalledCount = gnss_cb_->location_cbq_.calledCount(); EXPECT_EQ(locationCalledCount, 1); } if (locationCalledCount > 0) { // don't require speed on first fix CheckLocation(gnss_cb_->last_location_, false); Loading @@ -132,7 +136,7 @@ void GnssHalTest::StartAndCheckLocations(int count) { SetPositionMode(kMinIntervalMsec, kLowPowerMode); EXPECT_TRUE(StartAndCheckFirstLocation()); EXPECT_TRUE(StartAndCheckFirstLocation(/* strict= */ true)); for (int i = 1; i < count; i++) { EXPECT_TRUE(gnss_cb_->location_cbq_.retrieve(gnss_cb_->last_location_, Loading gnss/2.0/vts/functional/gnss_hal_test.h +3 −1 Original line number Diff line number Diff line Loading @@ -214,9 +214,11 @@ class GnssHalTest : public ::testing::VtsHalHidlTargetTestBase { * <p> Note this leaves the Location request active, to enable Stop call vs. other call * reordering tests. * * <p> if 'strict' is true, the test will fail if no location is generated. * * returns true if a location was successfully generated */ bool StartAndCheckFirstLocation(); bool StartAndCheckFirstLocation(bool strict); /* * CheckLocation: Loading Loading
gnss/1.1/vts/functional/gnss_hal_test.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ void GnssHalTest::SetPositionMode(const int min_interval_msec, const bool low_po EXPECT_TRUE(result); } bool GnssHalTest::StartAndCheckFirstLocation() { bool GnssHalTest::StartAndCheckFirstLocation(bool strict) { auto result = gnss_hal_->start(); EXPECT_TRUE(result.isOk()); Loading @@ -119,7 +119,9 @@ bool GnssHalTest::StartAndCheckFirstLocation() { const int kFirstGnssLocationTimeoutSeconds = 75; wait(kFirstGnssLocationTimeoutSeconds); if (strict) { EXPECT_EQ(location_called_count_, 1); } if (location_called_count_ > 0) { // don't require speed on first fix Loading @@ -142,7 +144,7 @@ void GnssHalTest::StartAndCheckLocations(int count) { SetPositionMode(kMinIntervalMsec, kLowPowerMode); EXPECT_TRUE(StartAndCheckFirstLocation()); EXPECT_TRUE(StartAndCheckFirstLocation(/* strict= */ true)); for (int i = 1; i < count; i++) { EXPECT_EQ(std::cv_status::no_timeout, wait(kLocationTimeoutSubsequentSec)); Loading
gnss/1.1/vts/functional/gnss_hal_test.h +3 −1 Original line number Diff line number Diff line Loading @@ -113,9 +113,11 @@ class GnssHalTest : public ::testing::VtsHalHidlTargetTestBase { * <p> Note this leaves the Location request active, to enable Stop call vs. other call * reordering tests. * * <p> if 'strict' is true, the test will fail if no location is generated. * * returns true if a location was successfully generated */ bool StartAndCheckFirstLocation(); bool StartAndCheckFirstLocation(bool strict); /* * CheckLocation: Loading
gnss/1.1/vts/functional/gnss_hal_test_cases.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ TEST_F(GnssHalTest, GetLocationLowPower) { SetPositionMode(kMinIntervalMsec, kLowPowerMode); // Don't expect true - as without AGPS access if (!StartAndCheckFirstLocation()) { if (!StartAndCheckFirstLocation(/* strict= */ false)) { ALOGW("GetLocationLowPower test - no first low power location received."); } Loading
gnss/2.0/vts/functional/gnss_hal_test.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ void GnssHalTest::SetPositionMode(const int min_interval_msec, const bool low_po EXPECT_TRUE(result); } bool GnssHalTest::StartAndCheckFirstLocation() { bool GnssHalTest::StartAndCheckFirstLocation(bool strict) { const auto result = gnss_hal_->start(); EXPECT_TRUE(result.isOk()); Loading @@ -104,12 +104,16 @@ bool GnssHalTest::StartAndCheckFirstLocation() { * so allow time to demodulate ephemeris over the air. */ const int kFirstGnssLocationTimeoutSeconds = 75; int locationCalledCount = 0; if (strict) { EXPECT_TRUE(gnss_cb_->location_cbq_.retrieve(gnss_cb_->last_location_, kFirstGnssLocationTimeoutSeconds)); int locationCalledCount = gnss_cb_->location_cbq_.calledCount(); EXPECT_EQ(locationCalledCount, 1); locationCalledCount = gnss_cb_->location_cbq_.calledCount(); EXPECT_EQ(locationCalledCount, 1); } if (locationCalledCount > 0) { // don't require speed on first fix CheckLocation(gnss_cb_->last_location_, false); Loading @@ -132,7 +136,7 @@ void GnssHalTest::StartAndCheckLocations(int count) { SetPositionMode(kMinIntervalMsec, kLowPowerMode); EXPECT_TRUE(StartAndCheckFirstLocation()); EXPECT_TRUE(StartAndCheckFirstLocation(/* strict= */ true)); for (int i = 1; i < count; i++) { EXPECT_TRUE(gnss_cb_->location_cbq_.retrieve(gnss_cb_->last_location_, Loading
gnss/2.0/vts/functional/gnss_hal_test.h +3 −1 Original line number Diff line number Diff line Loading @@ -214,9 +214,11 @@ class GnssHalTest : public ::testing::VtsHalHidlTargetTestBase { * <p> Note this leaves the Location request active, to enable Stop call vs. other call * reordering tests. * * <p> if 'strict' is true, the test will fail if no location is generated. * * returns true if a location was successfully generated */ bool StartAndCheckFirstLocation(); bool StartAndCheckFirstLocation(bool strict); /* * CheckLocation: Loading