From 6c2636ce6b183f5329ac50d6c5c615b4c73a3d82 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Tue, 19 Oct 2021 14:40:25 -0700 Subject: [PATCH] Add emulation support for Pluto and GithubAction Signed-off-by: Travis F. Collins --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ test/test_pluto_p.py | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1154770d7..47363031a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,6 +30,36 @@ jobs: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} run: coveralls + Test-Emulate: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + bash ./.github/scripts/install_libiio.sh + bash ./.github/scripts/install_iioemu.sh + bash ./.github/scripts/install_pydeps.sh + sudo pip install git+https://github.com/tfcollins/pytest-libiio.git@dev-mock + + + - name: Test + run: pytest -k "not stress and not dds and not sfdr and not overflow and not underflow" -v --scan-verbose --adi-hw-map --emu --emu-xml=pluto.xml + + # - name: Report coverage + # if: matrix.python-version == 3.6 + # env: + # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + # run: coveralls + Lint: runs-on: ubuntu-latest diff --git a/test/test_pluto_p.py b/test/test_pluto_p.py index fc57c70ba..8daeb695f 100644 --- a/test/test_pluto_p.py +++ b/test/test_pluto_p.py @@ -1,6 +1,6 @@ import pytest -hardware = ["pluto", "adrv9361", "fmcomms2"] +hardware = ["pluto", "adrv9361", "fmcomms2", "pluto_rev_c"] classname = "adi.Pluto"