diff --git a/test/emu/devices/ad7986.xml b/test/emu/devices/ad7986.xml new file mode 100644 index 000000000..118b3a58f --- /dev/null +++ b/test/emu/devices/ad7986.xml @@ -0,0 +1 @@ +]> diff --git a/test/test_ad7986.py b/test/test_ad7986.py new file mode 100644 index 000000000..1fffb07d8 --- /dev/null +++ b/test/test_ad7986.py @@ -0,0 +1,28 @@ +import pytest + +hardware = "ad7986" +classname = "adi.ad7986" + + +######################################### +@pytest.mark.iio_hardware(hardware) +@pytest.mark.parametrize("classname", [(classname)]) +@pytest.mark.parametrize( + "attr, val", + [ + ( + "sampling_frequency", + [10000, 50000, 100000, 200000, 500000, 1000000, 2000000, 2500000], + ), + ], +) +def test_ad7986_attr(test_attribute_multiple_values, iio_uri, classname, attr, val): + test_attribute_multiple_values(iio_uri, classname, attr, val, 1) + + +######################################### +@pytest.mark.iio_hardware(hardware, True) +@pytest.mark.parametrize("channel", [0]) +@pytest.mark.parametrize("classname", [classname]) +def test_ad7986_rx_data(test_dma_rx, iio_uri, classname, channel): + test_dma_rx(iio_uri, classname, channel)