From 0eb271fa61730f4ae68992b76cbdd521b7a0cb90 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Thu, 2 Jan 2025 15:55:17 +0100 Subject: [PATCH] tests: fix peripheral interrupt test - wrong check for rx buffer full --- hdl_spi/tests/test_spi_peripheral.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hdl_spi/tests/test_spi_peripheral.py b/hdl_spi/tests/test_spi_peripheral.py index c1d4820..8bab1d1 100644 --- a/hdl_spi/tests/test_spi_peripheral.py +++ b/hdl_spi/tests/test_spi_peripheral.py @@ -25,7 +25,7 @@ INTMASK_RX_BUFFER_FULL = 1 INTMASK_TX_BUFFER_EMPTY = 2 INTMASK_LOST_RX_DATA = 4 -STATUS_RX_BUFFER_FULL = 0 +STATUS_RX_BUFFER_FULL = 1 STATUS_TX_BUFFER_EMPTY = 2 STATUS_BUSY = 8 STATUS_LOST_RX_DATA = 16 @@ -365,6 +365,7 @@ def spi_peripheral_tests_runner(): test_filter = os.getenv("TESTCASE", None) gui = True if os.getenv("GUI", "0") == "1" else False + run = True if os.getenv("RUN", "1") == "1" else False proj_path = Path(__file__).resolve().parent.parent # equivalent to setting the PYTHONPATH environment variable @@ -401,11 +402,12 @@ def spi_peripheral_tests_runner(): always=True, build_args=build_args + extra_args, ) - runner.test( - test_filter = test_filter, - hdl_toplevel="spi_peripheral", hdl_toplevel_lang=hdl_toplevel_lang, - test_module="test_spi_peripheral", test_args = extra_args, gui = gui - ) + if run: + runner.test( + test_filter = test_filter, + hdl_toplevel="spi_peripheral", hdl_toplevel_lang=hdl_toplevel_lang, + test_module="test_spi_peripheral", test_args = extra_args, gui = gui + ) if __name__ == "__main__": -- 2.48.1