embed-me / vunit-mode Goto Github PK
View Code? Open in Web Editor NEWA simple Emacs minor mode for VUnit
License: GNU General Public License v3.0
A simple Emacs minor mode for VUnit
License: GNU General Public License v3.0
First off, I am using spacemacs, but this bug probably also applies to other emacs configurations.
The problem is, that zsh is trying to expand the testcase parameter to the vunit script, if it contains an asterisk.
This is the case, if either all testcases in the buffer, or the testcase under the cursor should be simulated.
Sample Testbench:
library vunit_lib;
context vunit_lib.vunit_context;
entity tb_simple_test is
generic (runner_cfg: string := runner_cfg_default);
end entity;
architecture tb of tb_simple_test is
begin
test_runner: process
begin
test_runner_setup(runner, runner_cfg);
while test_suite loop
if run("testcase_1") then -- define one VUnit testcase
check(5 = 5, "Arithmetic is broken");
end if;
end loop;
test_runner_cleanup(runner);
end process;
end architecture;
Output of trying to simulate the single testcase with vunit-mode (I replaced my project dir with PROJDIR):
python PROJDIR/vunit/run.py *.testcase_1 --output-path PROJDIR/vunit/vunit_out --no-color --num-threads 1
zsh:1: no matches found: *.testcase_1
Possible fix/workaround:
I have modified the format call in my local vunit-mode.el, so that it surrounds the parameter with ' '.
(Line 165 for the cursor option)
(defun vunit-sim-cursor ()
"Simulate testcase at cursor."
(interactive)
(with-current-buffer (buffer-name)
(save-excursion
(if (not (vunit--match-line))
(re-search-backward vunit--regex-testcase nil 'noerror))
(if (vunit--match-line)
- (vunit--run (format "*.%s" (vunit--match-line)))
+ (vunit--run (format "'*.%s'" (vunit--match-line)))
(message "No testcase...")))))
Which seems to work, at least on my machine. I don't know if this will have side effects on other shells
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.