Skip to content

Commit

Permalink
Added a condition to skip the interface gain narrowband test - ADRV90…
Browse files Browse the repository at this point in the history
…02 (analogdevicesinc#268)

* Formatting change

Signed-off-by: Hannah Rosete <[email protected]>

* Added a condition to skip the interface gain narrowband test

Signed-off-by: Hannah Rosete <[email protected]>
  • Loading branch information
HRosete authored Dec 3, 2021
1 parent 0c9c40b commit a013643
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_adrv9002_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
lte_5_cmos_profile = profile_path + "lte_5_cmos_api_48_26_4.json"
lte_5_cmos_stream = profile_path + "lte_5_cmos_api_48_26_4.stream"


#########################################
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
Expand Down Expand Up @@ -135,6 +136,20 @@ def test_adrv9002_str_attr(
def test_adrv9002_interface_gain_narrowband(
test_attribute_multipe_values_with_depends, iio_uri, classname, attr, depends, val
):
from adi.adrv9002 import adrv9002

sdr = adrv9002(iio_uri)
if attr == "interface_gain_chan0":
if sdr.rx0_sample_rate > 1000000:
pytest.skip(
"Baseband RX1 Sample Rate should be less than 1MHz to run this test."
)
elif attr == "interface_gain_chan1":
if sdr.rx1_sample_rate > 1000000:
pytest.skip(
"Baseband RX2 Sample Rate should be less than 1MHz to run this test."
)

test_attribute_multipe_values_with_depends(
iio_uri, classname, attr, depends, val, 0
)
Expand Down

0 comments on commit a013643

Please sign in to comment.