After running the regression tests and fixing the bugs, I want to re-run only the tests that failed in the regression.
The regression test environment for my own CPU currently takes a test file list as a JSON file and runs the tests in parallel. This time, I made it save the regression results as a JSON file so that the results can be reused as a test file list.
The input test file list has the following JSON format.
[ { "name": "config_00000", "group": [ "aapg_priv_m_202309201729" ], "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00000.riscv", "xlen": 64 }, { "name": "config_00001", "group": [ "aapg_priv_m_202309201729" ], "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00001.riscv", "xlen": 64 }, { "name": "config_00002", "group": [ "aapg_priv_m_202309201729" ], "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00002.riscv", "xlen": 64 }, { "name": "config_00003", "group": [ "aapg_priv_m_202309201729" ], "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00003.riscv", "xlen": 64 }, { "name": "config_00004", "group": [ "aapg_priv_m_202309201729" ], "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00004.riscv", "xlen": 64 } ]
In the resulting JSON file, on the other hand, the results are labeled in "group" as pass/fail and so on. After debugging, all you need to do is re-run only the tests tagged fail.
{ "name": "config_00111", "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00111.riscv", "group": [ "aapg_priv_m_202309201729", "pass" ] }, { "name": "config_00102", "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00102.riscv", "group": [ "aapg_priv_m_202309201729", "error" ] }, { "name": "config_00116", "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00116.riscv", "group": [ "aapg_priv_m_202309201729", "pass" ] }, { "name": "config_00112", "elf": "../../../tests/aapg/202309201729/bin/out_config_priv_m_00112.riscv", "group": [ "aapg_priv_m_202309201729", "unknown" ] },
This is an English translation of the original Japanese post: 自作CPUコアのアトミックアクセス系と面倒なLSU周りの解析 (4. リグレッションテストとリトライ用の便利スクリプトの作成)