New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardcoded installation path of verilator in unit tests #168
Comments
verilator is in the PATH, so switch to command line instead of absolute path.
Okay, that breaks in continuous integration, because it's not picking up /usr/local/bin/ from the PATH. On my machine, VERILATOR_ROOT and VERILATOR_BIN are not set on install (these appear to be build variables). |
Take 2. verilator is a script, so needs to be launched from a script, but invoking sh does not use the PATH variable. Let python start the shell instead.
I kind of mangled the commit log, but /usr/local/bin/verilator is a perl script (which then invokes the actual executable), so it can't be invoked directly by subprocess.call. My original workaround was to execute 'sh' with verilator as the argument. But that doesn't perform a PATH lookup (since it's an argument), hence the hardcoded path. Instead, invoking subprocess.call with shell=true uses PATH as expected. |
Currently verilator installation path is hardcoded in "NyuziProcessor/tests/unit/runtest.py", this prevents use of non-standard installation paths (for example if the user does not have root permissions or if verilator is installed as a module).
NyuziProcessor/tests/unit/runtest.py
Lines 106 to 116 in 270064e
This most easily could be fixed by taking into account the VERILATOR_ROOT and VERILATOR_BIN environment variables that verilator uses to keep track of non-standard installation locations.
The text was updated successfully, but these errors were encountered: