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

Move testing over to pytest and change CI to account for it #163

Merged
merged 12 commits into from
Aug 29, 2024
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@ on:
workflow_dispatch:

jobs:
switchboard_ci:
name: "Switchboard CI"
runs-on: ubuntu-latest
container:
image: ghcr.io/zeroasiccorp/sbtest:latest
timeout-minutes: 10

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: pytest
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e .[test]
pytest -m "switchboard"
azaidy marked this conversation as resolved.
Show resolved Hide resolved

get_testbenches:
name: 'Get testbenches'
if: false
azaidy marked this conversation as resolved.
Show resolved Hide resolved

runs-on: ubuntu-latest

Expand Down
16 changes: 14 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ version = {attr = "umi.__version__"}

[project.optional-dependencies]
test = [
"switchboard-hw>=0.2.14",
"flake8==7.1.1"
"switchboard-hw>=0.2.15",
"flake8==7.1.1",
"pytest==8.3.2",
"pytest-xdist==3.6.1",
"pytest-timeout==2.3.1"
]

[tool.setuptools]
Expand All @@ -43,3 +46,12 @@ packages = [
ignore = [
"W002"
]

[tool.pytest.ini_options]
markers = [
"switchboard: this test requires switchboard to run"
]
testpaths = [
"umi/sumi/tests"
]
timeout = "300"
4 changes: 2 additions & 2 deletions umi/sumi/rtl/umi_isolate.v
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module umi_isolate
.iso(isolate));

la_visolo #(.N(DW))
i_data (.in(umi_srcaddr[DW-1:0]),
.out(umi_srcaddr_iso[DW-1:0]),
i_data (.in(umi_data[DW-1:0]),
.out(umi_data_iso[DW-1:0]),
.iso(isolate));
end
else
Expand Down
83 changes: 0 additions & 83 deletions umi/sumi/testbench/test_fifo.py

This file was deleted.

87 changes: 0 additions & 87 deletions umi/sumi/testbench/test_fifo_flex.py

This file was deleted.

13 changes: 4 additions & 9 deletions umi/sumi/testbench/testbench_crossbar.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ module testbench
input clk
);

`include "switchboard.vh"

localparam N = PORTS;

/*AUTOWIRE*/
Expand Down Expand Up @@ -171,15 +173,8 @@ module testbench
nreset <= nreset | 1'b1;
end

// control block
initial
begin
azaidy marked this conversation as resolved.
Show resolved Hide resolved
if ($test$plusargs("trace"))
begin
$dumpfile("testbench.fst");
$dumpvars(0, testbench);
end
end
// waveform dump
`SB_SETUP_PROBES

// auto-stop

Expand Down
Loading