Closed ashfak12 closed 4 years ago
Sorry you are having trouble.
The tests failing are all of the tests relying on the C code, which seems more than suspicious.
According to CPAN testers it is all green: http://matrix.cpantesters.org/?author=wsnyder#Verilog-Perl-3.470
So, is there something unusual about your system e.g. non-Linux based? What distro is this?
Can you please attach the build log when you made Verilog-Perl?
Also your version of flex and bison please.
I am using the following Linux distribution: SUSE Linux Enterprise Server 11 (x86_64)
Perl Version: 5.14.1 Gcc version: 4.7.2 Flex version: 2.5.4 Bison version: 2.4
I've tried older older Verilog-Perl releases too, and face the same issue. (Verilog-Perl-3.466 & Verilog-Perl-3.468). CSPAN testers for all these versions are green too.
Here is my make compile log. build.log
I also un-commented the following line in 30_preproc.t to print more debug info:
Line 68: $pp->debug(9);
Here is the test log with this debug set. 30_preproc.log
Here inc.out file from 30_preproc test, if that helps.. inc.txt
Bison 2.4 is likely the problem as is over 12 years old. Use at least 2.4.1.
Bison 2.4.1 and flex 2.5.35 are the oldest known to work.
I updated to Bison 3.0.4 & Flex 2.6.4. Now most of tests are passing with Verilog-Perl-3.470
Two tests are still failing with following errors
t/51_vrename_kwd.t .... ok
t/56_editfiles.t ...... ok
t/58_vsplitmodule.t ... ok
t/60_vpassert.t ....... 1/6 %Warning: Line 69 mismatches; test_dir/.vpassertcall/example.v t/60_vpassert.out
GOT: `line 29 "verilog/example.v" 0
EXP: `line 36 "verilog/example.v" 0
To update reference: HARNESS_UPDATE_GOLDEN=1 t/60_vpassert.t
# Failed test 'diff'
# at t/60_vpassert.t line 36.
# Looks like you failed 1 test of 6.
t/60_vpassert.t ....... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests
(less 1 skipped subtest: 4 okay)
t/80_vppreproc.t ...... ok
t/85_vhier.t .......... 9/17 %Warning: Line 4 mismatches; test_dir/vhier.out t/85_vhier_skiplist.out
GOT: |--subsub0 v_hier_subsub
EXP: *EOF*
To update reference: HARNESS_UPDATE_GOLDEN=1 t/85_vhier.t
# Failed test 'vhier file compare'
# at t/85_vhier.t line 36.
# Looks like you failed 1 test of 17.
t/85_vhier.t .......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/17 subtests
t/86_vhier_tick.t ..... ok
t/87_vhier_unicode.t .. ok
Test Summary Report
-------------------
t/60_vpassert.t (Wstat: 256 Tests: 6 Failed: 1)
Failed test: 5
Non-zero exit status: 1
t/85_vhier.t (Wstat: 256 Tests: 17 Failed: 1)
Failed test: 14
Non-zero exit status: 1
Files=34, Tests=482, 6 wallclock secs ( 0.15 usr 0.06 sys + 4.27 cusr 0.42 csys = 4.90 CPU)
Result: FAIL
Failed 2/34 test programs. 2/482 subtests failed.
make: *** [test_dynamic] Error 255
You are on the same flex & bison as me then which is good.
If you'd be willing to debug these it would be great, the vpassert is some line number isn't tracked right, the vhier is it seems to be ignoring or mismatching on the 85_vhier_skiplist.dat file.
Also what does
printenv | grep LANG
say? Try setting it to C and see if that helps.
But if you want to move on it should be functional enough to force install and use.
Here are few of my env varaibles
printenv | grep LANG
LANG=en_US.UTF-8
printenv | grep LC_
LC_NUMERIC=C
LC_MESSAGES=C
LC_CTYPE=C
LC_COLLATE=C
LC_MONETARY=C
LC_TIME=C
I tried changing LANG to C, but didn't see any difference in results.
I ran t/60_vpassert.t test, and found that the difference is just on one line.
test_dir/.vpassertcall/example.v(left) vs t/60_vpassert.out (right)
Can you make sure the kit is correct (nothing modified) and no other versions of Verilog-Perl are installed? Beyond that you'd need to turn on debug and start following the code between this and another machine to see why it's different. The vhier test might be easier as it shouldn't be printing the line it is with the v_hier_subsub
Yes I used the kit as is and I dont have any other versions of Verilog-Perl installed.
I debugged 85_vhier.t test, and it seems like skiplist is read into array on vhier, but the grep expression to ignore it fails to match.
I modified Line 322 on vhier from
if (grep { $name =~ $_ } @Opt_Skiplist_Names) {
to
if (grep (/^$name\b/, @Opt_Skiplist_Names)) {
With this change it passes the test.
Using foreach loop the following code also works (replacing lines 322-325).
foreach (@Opt_Skiplist_Names) {
if ($_ =~ /^$name\s*$/) {
print "Debug: Skipping module $name" if $Debug;
return;
}
}
Also closing the file handle before exiting on line 93 would be better.
$fh->close();
The skiplist contains regexps, which I think your proposed changes break. What is strange to me is why the grep breaks on your system?
I'll add the close as certainly clearer, but it isn't technically needed as the exit will close files.
I looked into it a bit more, and it seems that somehow my system is messing up while reading input from skiplist.dat file. Though i could see that it reads input fine (without any spaces in the end), if i add this substitution on each read line, before appending them to array, grep works fine. Line 379:
while (<$fh>) {
chomp;
$_ =~ s/\s+$//; #remove spaces
push @Opt_Skiplist_Names, $_;
}
Do you have any idea as to why this would be an issue?
Check for DOS carriage returns. Maybe you unpacked on a windows system rather than linux?
My bad. That was the issue. I unpacked in linux and all tests passes now. Thanks
Few of Make file test included with verilog-perl (Verilog-Perl-3.470) fails. It seems like most of these failures are related to parser errors. Below is a snippet of failing report.
Commands used in order: 1) perl Makefile.PL 2) make 3) make test
On running one of the failing test with verbose: 30_preproc.t