test_i2s_loopback:

- Add tracing options
- Add TDM testing at 96khz
- Fix up defines
This commit is contained in:
xross
2022-09-28 11:09:33 +01:00
parent fe39cd7c11
commit e1d0974912
2 changed files with 52 additions and 15 deletions

View File

@@ -51,7 +51,12 @@ def do_test(
]
result = Pyxsim.run_on_simulator(
binary, simthreads=[], tester=tester, simargs=simargs, capfd=capfd
binary,
tester=tester,
simargs=simargs,
capfd=capfd,
instTracing=options.enabletracing,
vcdTracing=options.enablevcdtracing,
)
return result
@@ -60,7 +65,7 @@ def do_test(
@pytest.mark.parametrize("i2s_role", ["master", "slave"])
@pytest.mark.parametrize("pcm_format", ["i2s", "tdm"])
@pytest.mark.parametrize("channel_count", [2, 8, 16])
@pytest.mark.parametrize("sample_rate", ["48khz", "192khz"])
@pytest.mark.parametrize("sample_rate", ["48khz", "96khz", "192khz"])
def test_i2s_loopback(
i2s_role, pcm_format, channel_count, sample_rate, test_file, options, capfd
):
@@ -68,6 +73,9 @@ def test_i2s_loopback(
if pcm_format == "i2s" and channel_count == 16:
pytest.skip("Invalid parameter combination")
if pcm_format == "i2s" and sample_rate not in ["48khz", "192khz"]:
pytest.skip("Invalid parameter combination")
if pcm_format == "tdm" and channel_count == 2:
pytest.skip("Invalid parameter combination")