Bochlin / vunit-test-explorer

VUnit test explorer for VSCode
MIT License
12 stars 5 forks source link

No way to use it #12

Closed raph31t closed 4 years ago

raph31t commented 4 years ago

Hi,

I'm a fan user of vunit for testing my VHDL. I've installed the plugin in VS Code, but no test appear in the test explorer. Do I need to do something special to make it work ?

The file "run.py" is at the root of the workspace folder, pyhton is reachable from VS Code. What is missing ?

Thanks.

halfow commented 4 years ago

If yo have compile errors it will not show, can you check your output log (bar with the terminal)

You can also run python run.py int the integrated vscode terminal to se if its any errors.

Start with this and see what it yeilds :)

raph31t commented 4 years ago

Thanks for your feedback. I already did that. There is no error inthe terminal. And the cmd "python run.py" runs fine in the terminal. All tests are executed perfectly.

As more information, I may say that the "Test Explorer Window" is totally empty. Even after a refresh, no test are displayed.

Also I'm on Windows 10, use winpython 3.8 and GHDL 0.37.

Any other idea?

halfow commented 4 years ago

can u try this vhdl component tested this on windows with modelsim though.

Could be something if you got multiple python version or have not set up all needed PATH variables.

Runing a component I know works removes some possible error vectors for me :)

raph31t commented 4 years ago

I've tried the vhdl_component proposed and same result. No error, "python run.py" runs successfully but no test are displayed in the test explorer window.

I've created a venv in the component folder in which I've pip "vunit_hdl". I'm sure that I've selected the right python interpreter. I'm able to debug "run.py" from VSCode.

halfow commented 4 years ago

That might be why. I'm running vunit on my default python install

Under settings you can find the vunit test explorer settings, here you can point out your python path. So I do not think this plugin make use of the version set by rest of vscode (the one you get inte the terminal view).

set Vunit option to -v while you are on it to get some more useful outputs from the plugin :)

The output log i often find very helpful :) vunit output vscode vunit settings

raph31t commented 4 years ago

That's it. I've removed the venv, and install vunit inside my python install folder. And now, I'm able to view tests inside test explorer.

Is it a bug, or your plugin is not designed to support vunit inside venv ?

Thanks for your help.

halfow commented 4 years ago

I guess using the vscode selected python interpreter instead of a special one should be on the road map.

@Bochlin will need to give some input about his intentions of this

Glad to hear it worked out (y)

Bochlin commented 4 years ago

The extension should be updated to use the vscode python interpreter as default. It makes sense as that is likely the one being used to develop the run.py script. Currently if no python interpreter is selected, the extension will use the python executable found in the path.

Bochlin commented 4 years ago

Closing in favor of #13