-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_runner.py
More file actions
34 lines (30 loc) · 1.41 KB
/
test_runner.py
File metadata and controls
34 lines (30 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
"""
Run all testbenches in the project using VUnit.
It functions as a wrapper to not bother the user with the details of VUnit.
Author: N. Selvarajah
"""
import sys
import os
from utils.run_all_testbenches_lib import main as run_all_testbenches_lib
from utils.run_all_testbenches_lib import bcolours
def run_all_testbenches():
returncode = run_all_testbenches_lib(
path="./ip/", # Path where the HDL & tb files are located
tb_pattern="**", # Match all testbenches
timeout_ms=1.0, # Timeout in milliseconds
gui=False, # Set to True to open ModelSim/QuestaSim GUI
compile_only=False, # Only compile, don't run simulations
clean=False, # Clean before building
debug=False, # Enable debug logging
use_xilinx_libs=True, # Add Xilinx simulation libraries, note set it true to load glbl module
use_intel_altera_libs=False, # Add Intel/Altera simulation libraries
excluded_list=[], # List of testbenches to exclude
xunit_xml=None # Output file for test results
)
print(
f"hdl_offline_tests: {bcolours.OKGREEN + 'Passed' if returncode == 0 else bcolours.FAIL + 'Failed'}{bcolours.ENDC}"
)
return returncode
if __name__ == "__main__":
exit(run_all_testbenches())