Skip to content

Commit

Permalink
tests: update obs test for adrv9371 and adrv9009
Browse files Browse the repository at this point in the history
Signed-off-by: Trecia Agoylo <[email protected]>
  • Loading branch information
tagoylo committed Apr 2, 2024
1 parent 1b98476 commit a600406
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def pytest_configure(config):
config.addinivalue_line(
"markers", "obs_required: mark tests that require observation data paths"
)
config.addinivalue_line(
"markers", "no_obs_required: mark tests that require observation data paths"
)
config.addinivalue_line("markers", "lvds_test: mark tests for LVDS")
config.addinivalue_line("markers", "cmos_test: mark tests for CMOS")

Expand Down Expand Up @@ -73,6 +76,10 @@ def pytest_runtest_setup(item):
pytest.skip(
"Testing requiring observation disabled. Use --obs-enable flag to enable"
)
if obs and "no_obs_required" in marks:
pytest.skip(
"Testing requiring observation enabled. Skipping this test"
)

# Handle CMOS and LVDS tests
cmos = item.config.getoption("--cmos")
Expand Down
4 changes: 4 additions & 0 deletions test/test_ad9371.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,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.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0, 1])
Expand Down Expand Up @@ -598,6 +599,7 @@ def test_ad9371_dds_loopback_for_obs(


#########################################
@pytest.mark.no_obs_required
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0, 1])
Expand Down Expand Up @@ -669,6 +671,7 @@ def test_ad9371_two_tone_loopback_with_10dB_splitter(


#########################################
@pytest.mark.no_obs_required
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0, 1])
Expand Down Expand Up @@ -743,6 +746,7 @@ def test_ad9371_dds_gain_check_vary_power_with_10dB_splitter(


#########################################
@pytest.mark.no_obs_required
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0, 1])
Expand Down
3 changes: 3 additions & 0 deletions test/test_adrv9009_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,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.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0, 1])
Expand Down Expand Up @@ -706,6 +707,7 @@ def test_adrv9009_dds_gain_check_agc_with_10db_splitter(


#########################################
@pytest.mark.no_obs_required
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0, 1])
Expand Down Expand Up @@ -835,6 +837,7 @@ def test_adrv9009_dds_gain_check_vary_power_with_10dB_splitter(
#########################################
# TODO: Test, see what's its difference with dds_loopback, PROBLEMATIC
# OSError: [Errno 5] Input/output error
@pytest.mark.no_obs_required
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize("channel", [0])
Expand Down

0 comments on commit a600406

Please sign in to comment.