Test driver: Use __ to prevent conflicts between similar named tests
This commit is contained in:
parent
211894cb3e
commit
a4bcb3de4a
|
|
@ -719,7 +719,7 @@ class EmitCImp : EmitCStmts {
|
||||||
varname = ": "+nodep->lhsp()->castVarRef()->varp()->prettyName();
|
varname = ": "+nodep->lhsp()->castVarRef()->varp()->prettyName();
|
||||||
}
|
}
|
||||||
puts(")) cout<<\"\tCHANGE: "+nodep->fileline()->ascii()
|
puts(")) cout<<\"\tCHANGE: "+nodep->fileline()->ascii()
|
||||||
+varname+"\"<<endl; );");
|
+varname+"\"<<endl; );\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ sub compile {
|
||||||
|
|
||||||
if ($param{vcs}) {
|
if ($param{vcs}) {
|
||||||
$self->_make_top();
|
$self->_make_top();
|
||||||
$self->_run(logfile=>"obj_dir/".$self->{name}."_vcs_compile.log",
|
$self->_run(logfile=>"obj_dir/".$self->{name}."__vcs_compile.log",
|
||||||
fails=>$param{fails},
|
fails=>$param{fails},
|
||||||
cmd=>[($ENV{VERILATOR_VCS}||"vcs"),
|
cmd=>[($ENV{VERILATOR_VCS}||"vcs"),
|
||||||
@{$param{vcs_flags}},
|
@{$param{vcs_flags}},
|
||||||
|
|
@ -340,7 +340,7 @@ sub compile {
|
||||||
}
|
}
|
||||||
if ($param{nc}) {
|
if ($param{nc}) {
|
||||||
$self->_make_top();
|
$self->_make_top();
|
||||||
$self->_run(logfile=>"obj_dir/".$self->{name}."_nc_compile.log",
|
$self->_run(logfile=>"obj_dir/".$self->{name}."__nc_compile.log",
|
||||||
fails=>$param{fails},
|
fails=>$param{fails},
|
||||||
cmd=>[($ENV{VERILATOR_NCVERILOG}||"ncverilog"),
|
cmd=>[($ENV{VERILATOR_NCVERILOG}||"ncverilog"),
|
||||||
@{$param{nc_flags}},
|
@{$param{nc_flags}},
|
||||||
|
|
@ -388,7 +388,7 @@ sub compile {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->_run(logfile=>"obj_dir/".$self->{name}."_simx_compile.log",
|
$self->_run(logfile=>"obj_dir/".$self->{name}."__simx_compile.log",
|
||||||
fails=>$param{fails},
|
fails=>$param{fails},
|
||||||
expect=>$param{expect},
|
expect=>$param{expect},
|
||||||
cmd=>\@v3args);
|
cmd=>\@v3args);
|
||||||
|
|
@ -402,7 +402,7 @@ sub compile {
|
||||||
$self->_sp_preproc(%param);
|
$self->_sp_preproc(%param);
|
||||||
}
|
}
|
||||||
$self->oprint("GCC\n");
|
$self->oprint("GCC\n");
|
||||||
$self->_run(logfile=>"obj_dir/".$self->{name}."_simx_gcc.log",
|
$self->_run(logfile=>"obj_dir/".$self->{name}."__simx_gcc.log",
|
||||||
cmd=>["cd obj_dir && ",
|
cmd=>["cd obj_dir && ",
|
||||||
"make", "-f".getcwd()."/Makefile_obj",
|
"make", "-f".getcwd()."/Makefile_obj",
|
||||||
"VM_PREFIX=$self->{VM_PREFIX}",
|
"VM_PREFIX=$self->{VM_PREFIX}",
|
||||||
|
|
@ -423,7 +423,7 @@ sub execute {
|
||||||
if ($param{vcs}) {
|
if ($param{vcs}) {
|
||||||
#my $fh = IO::File->new(">simv.key") or die "%Error: $! simv.key,";
|
#my $fh = IO::File->new(">simv.key") or die "%Error: $! simv.key,";
|
||||||
#$fh->print("quit\n"); $fh->close;
|
#$fh->print("quit\n"); $fh->close;
|
||||||
$self->_run(logfile=>"obj_dir/".$self->{name}."_simv.log",
|
$self->_run(logfile=>"obj_dir/".$self->{name}."__simv.log",
|
||||||
cmd=>["./simv",],
|
cmd=>["./simv",],
|
||||||
%param,
|
%param,
|
||||||
expect=>undef, # vcs expect isn't the same
|
expect=>undef, # vcs expect isn't the same
|
||||||
|
|
@ -432,7 +432,7 @@ sub execute {
|
||||||
if ($param{v3}
|
if ($param{v3}
|
||||||
#&& (!$param{needs_v4} || -r "$ENV{VERILATOR_ROOT}/src/V3Gate.cpp")
|
#&& (!$param{needs_v4} || -r "$ENV{VERILATOR_ROOT}/src/V3Gate.cpp")
|
||||||
) {
|
) {
|
||||||
$self->_run(logfile=>"obj_dir/".$self->{name}."_simx.log",
|
$self->_run(logfile=>"obj_dir/".$self->{name}."__simx.log",
|
||||||
cmd=>["obj_dir/$param{VM_PREFIX}",
|
cmd=>["obj_dir/$param{VM_PREFIX}",
|
||||||
],
|
],
|
||||||
%param,
|
%param,
|
||||||
|
|
@ -633,7 +633,7 @@ sub _make_main {
|
||||||
$fh->print(" SpTraceVcdCFile* tfp = new SpTraceVcdCFile;\n");
|
$fh->print(" SpTraceVcdCFile* tfp = new SpTraceVcdCFile;\n");
|
||||||
}
|
}
|
||||||
$fh->print(" topp->trace (tfp, 99);\n");
|
$fh->print(" topp->trace (tfp, 99);\n");
|
||||||
$fh->print(" tfp->open (\"obj_dir/".$self->{name}."_simx.vcd\");\n");
|
$fh->print(" tfp->open (\"obj_dir/".$self->{name}."__simx.vcd\");\n");
|
||||||
$fh->print("#endif\n");
|
$fh->print("#endif\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ if ($Last_Self->{nc}) {
|
||||||
"-test ${name} ${cf}"]);
|
"-test ${name} ${cf}"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.log", qr/COVER: Cyc==4/);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==4/);
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.log", qr/COVER: Cyc==5/);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==5/);
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.log", qr/COVER: Cyc==6/);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.log", qr/COVER: Cyc==6/);
|
||||||
|
|
||||||
# Allow old Perl format dump, or new binary dump
|
# Allow old Perl format dump, or new binary dump
|
||||||
file_grep ($Last_Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/);
|
file_grep ($Last_Self->{coverage_filename}, qr/(cyc_eq_5.*,c=>[^0]|cyc_eq_5.* [1-9][0-9]*\n)/);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ execute (
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
file_grep ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x);
|
file_grep ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/c_trace_on\"/x);
|
||||||
file_grep_not ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x);
|
file_grep_not ("obj_dir/V$Last_Self->{name}__Trace__Slow.cpp", qr/_trace_off\"/x);
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.vcd", qr/\$enddefinitions/x);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x);
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ execute (
|
||||||
|
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
# Note more checks in _cc.pl
|
# Note more checks in _cc.pl
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.vcd", qr/\$enddefinitions/x);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x);
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ execute (
|
||||||
|
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
# Note more checks in _cc.pl
|
# Note more checks in _cc.pl
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.vcd", qr/\$enddefinitions/x);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x);
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ execute (
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
!-r "obj_dir/$Last_Self->{name}_simx.vcd" or $Last_Self->error("Tracing should be off\n");
|
!-r "obj_dir/$Last_Self->{name}__simx.vcd" or $Last_Self->error("Tracing should be off\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ execute (
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
!-r "obj_dir/$Last_Self->{name}_simx.vcd" or $Last_Self->error("Tracing should be off\n");
|
!-r "obj_dir/$Last_Self->{name}__simx.vcd" or $Last_Self->error("Tracing should be off\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ execute (
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
!-r "obj_dir/$Last_Self->{name}_simx.vcd" or $Last_Self->error("Tracing should be off\n");
|
!-r "obj_dir/$Last_Self->{name}__simx.vcd" or $Last_Self->error("Tracing should be off\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ int main(int argc, char **argv, char **env) {
|
||||||
|
|
||||||
SpTraceVcdCFile* tfp = new SpTraceVcdCFile;
|
SpTraceVcdCFile* tfp = new SpTraceVcdCFile;
|
||||||
top->trace(tfp,99);
|
top->trace(tfp,99);
|
||||||
tfp->open("obj_dir/t_trace_public_func_simx.vcd");
|
tfp->open("obj_dir/t_trace_public_func__simx.vcd");
|
||||||
|
|
||||||
while (main_time <= 20) {
|
while (main_time <= 20) {
|
||||||
top->CLK = (main_time/dt_2)%2;
|
top->CLK = (main_time/dt_2)%2;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ if ($Last_Self->{v3}) {
|
||||||
check_finished=>1,
|
check_finished=>1,
|
||||||
);
|
);
|
||||||
|
|
||||||
ok(vcd_identical ("obj_dir/$Last_Self->{name}_simx.vcd",
|
ok(vcd_identical ("obj_dir/$Last_Self->{name}__simx.vcd",
|
||||||
"t/$Last_Self->{name}.out"));
|
"t/$Last_Self->{name}.out"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ int main(int argc, char **argv, char **env) {
|
||||||
|
|
||||||
SpTraceVcdCFile* tfp = new SpTraceVcdCFile;
|
SpTraceVcdCFile* tfp = new SpTraceVcdCFile;
|
||||||
top->trace(tfp,99);
|
top->trace(tfp,99);
|
||||||
tfp->open("obj_dir/t_trace_public_sig_simx.vcd");
|
tfp->open("obj_dir/t_trace_public_sig__simx.vcd");
|
||||||
|
|
||||||
while (main_time <= 20) {
|
while (main_time <= 20) {
|
||||||
top->CLK = (main_time/dt_2)%2;
|
top->CLK = (main_time/dt_2)%2;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ if ($Last_Self->{v3}) {
|
||||||
check_finished=>1,
|
check_finished=>1,
|
||||||
);
|
);
|
||||||
|
|
||||||
ok(vcd_identical ("obj_dir/$Last_Self->{name}_simx.vcd",
|
ok(vcd_identical ("obj_dir/$Last_Self->{name}__simx.vcd",
|
||||||
"t/$Last_Self->{name}.out"));
|
"t/$Last_Self->{name}.out"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ execute (
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($Last_Self->{v3}) {
|
if ($Last_Self->{v3}) {
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.vcd", qr/\$enddefinitions/x);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/\$enddefinitions/x);
|
||||||
my $sig = quotemeta("bra[ket]slash/dash-colon:9");
|
my $sig = quotemeta("bra[ket]slash/dash-colon:9");
|
||||||
file_grep ("obj_dir/$Last_Self->{name}_simx.vcd", qr/$sig/);
|
file_grep ("obj_dir/$Last_Self->{name}__simx.vcd", qr/$sig/);
|
||||||
}
|
}
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue