Skip to content

ad4880: add pyadi support #2263

ad4880: add pyadi support

ad4880: add pyadi support #2263

GitHub Actions / Test Results failed Mar 6, 2025 in 0s

2 fail, 1 234 skipped, 426 pass in 11m 52s

1 662 tests  ±0     426 ✅ ±0   11m 52s ⏱️ -1s
    1 suites ±0   1 234 💤 ±0 
    1 files   ±0       2 ❌ ±0 

Results for commit b9b5581. ± Comparison against earlier commit f3d3142.

Annotations

Check warning on line 0 in test.test_ad9172_p

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ad9172_tx_data[channel=[0, 1]-classname=adi.ad9172] (test.test_ad9172_p) failed

results.xml [took 5s]
Raw output
Exception: [Errno 32] Broken pipe
uri = 'ip:10.1.0.27', classname = 'adi.ad9172', channel = [0, 1]
use_tx2 = False

    def dma_tx(uri, classname, channel, use_tx2=False):
        """dma_tx: Construct TX buffers and verify no errors occur when pushed.
        Buffer is of size 2**15 and 10 buffers are pushed
    
        parameters:
            uri: type=string
                URI of IIO context of target board/system
            classname: type=string
                Name of pyadi interface class which contain attribute
            channel: type=list
                List of integers or list of list of integers of channels to
                enable through tx_enabled_channels
        """
        sdr = eval(classname + "(uri='" + uri + "')")
        TXFS = 1000
        N = 2 ** 15
        ts = 1 / float(TXFS)
        t = np.arange(0, N * ts, ts)
        fc = 10000
        d = np.cos(2 * np.pi * t * fc) * 2 ** 15 * 0.5
    
        if use_tx2:
            if not isinstance(channel, list):
                sdr.tx2_enabled_channels = [channel]
            else:
                sdr.tx2_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx2_buffer_size = N * len(sdr.tx2_enabled_channels)
        else:
            if not isinstance(channel, list):
                sdr.tx_enabled_channels = [channel]
            else:
                sdr.tx_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx_buffer_size = N * len(sdr.tx_enabled_channels)
    
        try:
            for _ in range(10):
>               sdr.tx2(d) if use_tx2 else sdr.tx(d)

test/dma_tests.py:126: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
adi/rx_tx.py:497: in tx
    self._tx_buffer_push(data)
adi/compat.py:191: in _tx_buffer_push
    self._txbuf.push()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/iio.py:1046: in push
    _buffer_push_partial(self._buffer, samples_count or self._samples_count)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

result = -32, func = <_FuncPtr object at 0x7fd66920ba00>
arguments = (<iio.LP__Buffer object at 0x7fd656146340>, 32768)

    def _check_negative(result, func, arguments):
        if result >= 0:
            return result
>       raise OSError(-result, _strerror(-result))
E       BrokenPipeError: [Errno 32] Broken pipe

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/iio.py:62: BrokenPipeError

During handling of the above exception, another exception occurred:

test_dma_tx = <function dma_tx at 0x7fd64c39d700>, iio_uri = 'ip:10.1.0.27'
classname = 'adi.ad9172', channel = [0, 1]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, [0, 1]])
    def test_ad9172_tx_data(test_dma_tx, iio_uri, classname, channel):
>       test_dma_tx(iio_uri, classname, channel)

test/test_ad9172_p.py:11: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

uri = 'ip:10.1.0.27', classname = 'adi.ad9172', channel = [0, 1]
use_tx2 = False

    def dma_tx(uri, classname, channel, use_tx2=False):
        """dma_tx: Construct TX buffers and verify no errors occur when pushed.
        Buffer is of size 2**15 and 10 buffers are pushed
    
        parameters:
            uri: type=string
                URI of IIO context of target board/system
            classname: type=string
                Name of pyadi interface class which contain attribute
            channel: type=list
                List of integers or list of list of integers of channels to
                enable through tx_enabled_channels
        """
        sdr = eval(classname + "(uri='" + uri + "')")
        TXFS = 1000
        N = 2 ** 15
        ts = 1 / float(TXFS)
        t = np.arange(0, N * ts, ts)
        fc = 10000
        d = np.cos(2 * np.pi * t * fc) * 2 ** 15 * 0.5
    
        if use_tx2:
            if not isinstance(channel, list):
                sdr.tx2_enabled_channels = [channel]
            else:
                sdr.tx2_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx2_buffer_size = N * len(sdr.tx2_enabled_channels)
        else:
            if not isinstance(channel, list):
                sdr.tx_enabled_channels = [channel]
            else:
                sdr.tx_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx_buffer_size = N * len(sdr.tx_enabled_channels)
    
        try:
            for _ in range(10):
                sdr.tx2(d) if use_tx2 else sdr.tx(d)
        except Exception as e:
            del sdr
>           raise Exception(e)
E           Exception: [Errno 32] Broken pipe

test/dma_tests.py:129: Exception

Check warning on line 0 in test.test_ad9361_p

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ad9361_tx_data[channel=[0, 1]-classname=adi.ad9361] (test.test_ad9361_p) failed

results.xml [took 5s]
Raw output
Exception: [Errno 32] Broken pipe
uri = 'ip:10.1.0.27', classname = 'adi.ad9361', channel = [0, 1]
use_tx2 = False

    def dma_tx(uri, classname, channel, use_tx2=False):
        """dma_tx: Construct TX buffers and verify no errors occur when pushed.
        Buffer is of size 2**15 and 10 buffers are pushed
    
        parameters:
            uri: type=string
                URI of IIO context of target board/system
            classname: type=string
                Name of pyadi interface class which contain attribute
            channel: type=list
                List of integers or list of list of integers of channels to
                enable through tx_enabled_channels
        """
        sdr = eval(classname + "(uri='" + uri + "')")
        TXFS = 1000
        N = 2 ** 15
        ts = 1 / float(TXFS)
        t = np.arange(0, N * ts, ts)
        fc = 10000
        d = np.cos(2 * np.pi * t * fc) * 2 ** 15 * 0.5
    
        if use_tx2:
            if not isinstance(channel, list):
                sdr.tx2_enabled_channels = [channel]
            else:
                sdr.tx2_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx2_buffer_size = N * len(sdr.tx2_enabled_channels)
        else:
            if not isinstance(channel, list):
                sdr.tx_enabled_channels = [channel]
            else:
                sdr.tx_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx_buffer_size = N * len(sdr.tx_enabled_channels)
    
        try:
            for _ in range(10):
>               sdr.tx2(d) if use_tx2 else sdr.tx(d)

test/dma_tests.py:126: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
adi/rx_tx.py:497: in tx
    self._tx_buffer_push(data)
adi/compat.py:191: in _tx_buffer_push
    self._txbuf.push()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/iio.py:1046: in push
    _buffer_push_partial(self._buffer, samples_count or self._samples_count)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

result = -32, func = <_FuncPtr object at 0x7fd66920ba00>
arguments = (<iio.LP__Buffer object at 0x7fd65609acc0>, 32768)

    def _check_negative(result, func, arguments):
        if result >= 0:
            return result
>       raise OSError(-result, _strerror(-result))
E       BrokenPipeError: [Errno 32] Broken pipe

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/iio.py:62: BrokenPipeError

During handling of the above exception, another exception occurred:

test_dma_tx = <function dma_tx at 0x7fd64c39d700>, iio_uri = 'ip:10.1.0.27'
classname = 'adi.ad9361', channel = [0, 1]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, [0, 1]])
    def test_ad9361_tx_data(test_dma_tx, iio_uri, classname, channel):
>       test_dma_tx(iio_uri, classname, channel)

test/test_ad9361_p.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

uri = 'ip:10.1.0.27', classname = 'adi.ad9361', channel = [0, 1]
use_tx2 = False

    def dma_tx(uri, classname, channel, use_tx2=False):
        """dma_tx: Construct TX buffers and verify no errors occur when pushed.
        Buffer is of size 2**15 and 10 buffers are pushed
    
        parameters:
            uri: type=string
                URI of IIO context of target board/system
            classname: type=string
                Name of pyadi interface class which contain attribute
            channel: type=list
                List of integers or list of list of integers of channels to
                enable through tx_enabled_channels
        """
        sdr = eval(classname + "(uri='" + uri + "')")
        TXFS = 1000
        N = 2 ** 15
        ts = 1 / float(TXFS)
        t = np.arange(0, N * ts, ts)
        fc = 10000
        d = np.cos(2 * np.pi * t * fc) * 2 ** 15 * 0.5
    
        if use_tx2:
            if not isinstance(channel, list):
                sdr.tx2_enabled_channels = [channel]
            else:
                sdr.tx2_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx2_buffer_size = N * len(sdr.tx2_enabled_channels)
        else:
            if not isinstance(channel, list):
                sdr.tx_enabled_channels = [channel]
            else:
                sdr.tx_enabled_channels = channel
                d = [d] * len(channel)
            sdr.tx_buffer_size = N * len(sdr.tx_enabled_channels)
    
        try:
            for _ in range(10):
                sdr.tx2(d) if use_tx2 else sdr.tx(d)
        except Exception as e:
            del sdr
>           raise Exception(e)
E           Exception: [Errno 32] Broken pipe

test/dma_tests.py:129: Exception