Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pytest markers for CI to select only sbus-based tests to run with Verilator #153

Merged
merged 1 commit into from
Dec 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Install Python dependencies
shell: bash -l {0}
run: |
pip install pyvisa pyvisa-sim coveralls cocotb==1.4.0
pip install pyvisa pyvisa-sim pytest coveralls cocotb==1.4.0

- name: Install Icarus Verilog
run: |
Expand Down
14 changes: 14 additions & 0 deletions tests/test_SimFifo8to32.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

import unittest
import pytest
import os

from basil.dut import Dut
Expand Down Expand Up @@ -91,5 +92,18 @@ def tearDown(self):
cocotb_compile_clean()


# TODO: add sbus versions of used modules
# @pytest.mark.verilator
# class TestSimFifo8to32Sbus(TestSimFifo8to32):
# def __init__(self, testname):
# super(TestSimFifo8to32Sbus, self).__init__(testname=testname, tb='test_SimFifo8to32.v', bus_drv='basil.utils.sim.BasilSbusDriver', bus_split='sbus')


@pytest.mark.verilator
class TestSimFifo8to32SbusTop(TestSimFifo8to32):
def __init__(self, testname):
super(TestSimFifo8to32SbusTop, self).__init__(testname=testname, tb='test_SimFifo8to32.v', bus_drv='basil.utils.sim.BasilSbusDriver', bus_split='top')


if __name__ == '__main__':
unittest.main()
28 changes: 0 additions & 28 deletions tests/test_SimFifo8to32_sbus.py

This file was deleted.

13 changes: 13 additions & 0 deletions tests/test_SimGpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

import unittest
import pytest
import os

from basil.dut import Dut
Expand Down Expand Up @@ -101,5 +102,17 @@ def tearDown(self):
cocotb_compile_clean()


@pytest.mark.verilator
class TestSimGpioSbus(TestSimGpio):
def __init__(self, testname):
super(TestSimGpioSbus, self).__init__(testname=testname, tb='test_SimGpio.v', bus_drv='basil.utils.sim.BasilSbusDriver', bus_split='sbus')


@pytest.mark.verilator
class TestSimGpioSbusTop(TestSimGpio):
def __init__(self, testname):
super(TestSimGpioSbusTop, self).__init__(testname=testname, tb='test_SimGpio.v', bus_drv='basil.utils.sim.BasilSbusDriver', bus_split='top')


if __name__ == '__main__':
unittest.main()
27 changes: 0 additions & 27 deletions tests/test_SimGpio_sbus.py

This file was deleted.

14 changes: 14 additions & 0 deletions tests/test_SimSpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

import unittest
import pytest
import os
import yaml

Expand Down Expand Up @@ -161,5 +162,18 @@ def tearDown(self):
cocotb_compile_clean()


# TODO: add sbus versions of used modules
# @pytest.mark.verilator
# class TestSimSpiSbus(TestSimSpi):
# def __init__(self, testname):
# super(TestSimSpiSbus, self).__init__(testname=testname, tb='test_SimSpi.v', bus_drv='basil.utils.sim.BasilSbusDriver', bus_split='sbus')


@pytest.mark.verilator
class TestSimSpiSbusTop(TestSimSpi):
def __init__(self, testname):
super(TestSimSpiSbusTop, self).__init__(testname=testname, tb='test_SimSpi.v', bus_drv='basil.utils.sim.BasilSbusDriver', bus_split='top')


if __name__ == '__main__':
unittest.main()
28 changes: 0 additions & 28 deletions tests/test_SimSpi_sbus.py

This file was deleted.