Skip to content
Snippets Groups Projects

Make VUnit VHDL-tests working directory insensitive, closes #197

Merged Mikael Henriksson requested to merge vunit-working-dir-insensitive into master
1 file
+ 8
2
Compare changes
  • Side-by-side
  • Inline
#!/usr/bin/env python3
#!/usr/bin/env python3
 
from os.path import abspath, dirname
 
from sys import argv
 
from vunit import VUnit
from vunit import VUnit
vu = VUnit.from_argv()
# Absolute path of the testbench directory
 
testbench_path = dirname(abspath(__file__))
 
 
vu = VUnit.from_argv(argv=['--output-path', f'{testbench_path}/vunit_out'] + argv[1:])
lib = vu.add_library("lib")
lib = vu.add_library("lib")
lib.add_source_files(
lib.add_source_files(
[
[
"*.vhdl",
f'{testbench_path}/*.vhdl',
]
]
)
)
lib.set_compile_option("modelsim.vcom_flags", ["-2008"])
lib.set_compile_option("modelsim.vcom_flags", ["-2008"])
Loading