From a013643b62e4f26605ac6b9d8e2ecf3bebe64307 Mon Sep 17 00:00:00 2001 From: Hannah Rosete <43806793+HRosete@users.noreply.github.com> Date: Fri, 3 Dec 2021 09:26:04 +0800 Subject: [PATCH] Added a condition to skip the interface gain narrowband test - ADRV9002 (#268) * Formatting change Signed-off-by: Hannah Rosete * Added a condition to skip the interface gain narrowband test Signed-off-by: Hannah Rosete --- test/test_adrv9002_p.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_adrv9002_p.py b/test/test_adrv9002_p.py index 221b33975..a4faa1f4b 100644 --- a/test/test_adrv9002_p.py +++ b/test/test_adrv9002_p.py @@ -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)]) @@ -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 )