From a1b4fb70470b399e239f94b792de7399ba5d653d Mon Sep 17 00:00:00 2001 From: Trecia Agoylo Date: Mon, 16 Sep 2024 13:15:00 +0800 Subject: [PATCH] tests: update emu supported test Signed-off-by: Trecia Agoylo --- test/test_ad9371.py | 24 ++++++++++++------------ test/test_ad9375.py | 26 +++++++++++++++++--------- test/test_adrv9009_p.py | 30 +++++++++++++++--------------- 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/test/test_ad9371.py b/test/test_ad9371.py index b780d2c5f..360f3b7fa 100644 --- a/test/test_ad9371.py +++ b/test/test_ad9371.py @@ -266,7 +266,7 @@ def test_ad9371_attr( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", range(2)) def test_ad9371_rx_data(test_dma_rx, iio_uri, classname, channel): @@ -275,7 +275,7 @@ def test_ad9371_rx_data(test_dma_rx, iio_uri, classname, channel): ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -314,7 +314,7 @@ def test_ad9371_dds_loopback( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -353,7 +353,7 @@ def test_ad9371_dds_loopback_with_10dB_splitter( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "channel, param_set", @@ -387,7 +387,7 @@ def test_ad9371_dds_loopback_for_obs( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -423,7 +423,7 @@ def test_ad9371_two_tone_loopback( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -459,7 +459,7 @@ def test_ad9371_two_tone_loopback_with_10dB_splitter( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -496,7 +496,7 @@ def test_ad9371_dds_gain_check_vary_power( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "channel, param_set, dds_scale, min_rssi, max_rssi", @@ -532,7 +532,7 @@ def test_ad9371_dds_gain_check_vary_power_with_10dB_splitter( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -557,7 +557,7 @@ def test_ad9371_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_min ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -584,7 +584,7 @@ def test_ad9371_sfdr_with_10dB_splitter( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "channel, param_set, sfdr_min", @@ -601,7 +601,7 @@ def test_ad9371_sfdr_for_obs( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("attr", ["profile"]) @pytest.mark.parametrize( diff --git a/test/test_ad9375.py b/test/test_ad9375.py index 485412192..65d9c2978 100644 --- a/test/test_ad9375.py +++ b/test/test_ad9375.py @@ -223,7 +223,7 @@ def test_ad9375_attr( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", range(2)) def test_ad9375_rx_data(test_dma_rx, iio_uri, classname, channel): @@ -233,6 +233,14 @@ def test_ad9375_rx_data(test_dma_rx, iio_uri, classname, channel): ######################################### @pytest.mark.iio_hardware(hardware) @pytest.mark.parametrize("classname", [(classname)]) +@pytest.mark.parametrize("channel", range(2)) +def test_ad9375_tx_data(test_dma_tx, iio_uri, classname, channel): + test_dma_tx(iio_uri, classname, channel) + + +######################################### +@pytest.mark.iio_hardware(hardware, True) +@pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, frequency, scale, peak_min", @@ -269,7 +277,7 @@ def test_ad9375_dds_loopback( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -304,7 +312,7 @@ def test_ad9375_two_tone_loopback( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -340,7 +348,7 @@ def test_ad9375_dds_gain_check_vary_power( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -364,7 +372,7 @@ def test_ad9375_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_min ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("attr", ["profile"]) @pytest.mark.parametrize( @@ -378,7 +386,7 @@ def test_ad9375_profile_write( # AD9375 ONLY ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, depends, values, tol, repeats", @@ -403,7 +411,7 @@ def test_ad9375_attr_with_depends( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, depends", @@ -450,7 +458,7 @@ def test_ad9375_attr_readonly_with_depends( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, depends, start, stop", @@ -504,7 +512,7 @@ def test_ad9375_attr_boolean( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, value", [("tx_dpd_reset_en_chan0", 1), ("tx_dpd_reset_en_chan1", 1),], diff --git a/test/test_adrv9009_p.py b/test/test_adrv9009_p.py index 6559d1b90..6c1ded694 100644 --- a/test/test_adrv9009_p.py +++ b/test/test_adrv9009_p.py @@ -382,7 +382,7 @@ def test_adrv9009_rx_data(test_dma_rx, iio_uri, classname, channel): ######################################## @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -414,7 +414,7 @@ def test_adrv9009_dds_loopback( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -447,7 +447,7 @@ def test_adrv9009_dds_loopback_with_10dB_splitter( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "channel, param_set, peak_min", @@ -480,7 +480,7 @@ def test_adrv9009_dds_loopback_for_obs( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -516,7 +516,7 @@ def test_adrv9009_two_tone_loopback( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -552,7 +552,7 @@ def test_adrv9009_two_tone_loopback_with_10dB_splitter( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -574,7 +574,7 @@ def test_adrv9009_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_m ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -598,7 +598,7 @@ def test_adrv9009_sfdr_with_10dB_splitter( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0]) @pytest.mark.parametrize( @@ -624,7 +624,7 @@ def test_adrv9009_sfdr_for_obs( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -658,7 +658,7 @@ def test_adrv9009_dds_gain_check_agc( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -688,7 +688,7 @@ def test_adrv9009_dds_gain_check_agc_with_10db_splitter( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -752,7 +752,7 @@ def test_adrv9009_dds_gain_check_vary_power( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -814,7 +814,7 @@ def test_adrv9009_dds_gain_check_vary_power_with_10dB_splitter( ######################################### @pytest.mark.no_obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -855,7 +855,7 @@ def test_adrv9009_iq_loopback(test_iq_loopback, iio_uri, classname, channel, par ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("attr", ["profile"]) @pytest.mark.parametrize( @@ -869,7 +869,7 @@ def test_adrv9009_profile_write( ######################################### @pytest.mark.skipif(skip_jesd, reason="JESD module not importable") -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) def test_adrv9009_jesd(iio_uri): import adi