Tests: Reduce verbosity unless use --verbose
This commit is contained in:
parent
d43e9aa2c5
commit
8d63f83177
|
|
@ -668,7 +668,7 @@ sub compile {
|
||||||
my $self = (ref $_[0]? shift : $Self);
|
my $self = (ref $_[0]? shift : $Self);
|
||||||
my %param = (%{$self}, @_); # Default arguments are from $self
|
my %param = (%{$self}, @_); # Default arguments are from $self
|
||||||
return 1 if $self->errors || $self->skips || $self->unsupporteds;
|
return 1 if $self->errors || $self->skips || $self->unsupporteds;
|
||||||
$self->oprint("Compile\n");
|
$self->oprint("Compile\n") if $self->{verbose};
|
||||||
|
|
||||||
compile_vlt_flags(%param);
|
compile_vlt_flags(%param);
|
||||||
|
|
||||||
|
|
@ -803,11 +803,12 @@ sub compile {
|
||||||
return 1 if $self->errors || $self->skips || $self->unsupporteds;
|
return 1 if $self->errors || $self->skips || $self->unsupporteds;
|
||||||
|
|
||||||
if (!$param{fails} && $param{verilator_make_gcc}) {
|
if (!$param{fails} && $param{verilator_make_gcc}) {
|
||||||
$self->oprint("GCC\n");
|
$self->oprint("GCC\n") if $self->{verbose};
|
||||||
$self->_run(logfile=>"$self->{obj_dir}/vlt_gcc.log",
|
$self->_run(logfile=>"$self->{obj_dir}/vlt_gcc.log",
|
||||||
cmd=>["make",
|
cmd=>["make",
|
||||||
"-C ".$self->{obj_dir},
|
"-C ".$self->{obj_dir},
|
||||||
"-f ".$::RealBin."/Makefile_obj",
|
"-f ".$::RealBin."/Makefile_obj",
|
||||||
|
($self->{verbose} ? "" : "--no-print-directory"),
|
||||||
"VM_PREFIX=$self->{VM_PREFIX}",
|
"VM_PREFIX=$self->{VM_PREFIX}",
|
||||||
"TEST_OBJ_DIR=$self->{obj_dir}",
|
"TEST_OBJ_DIR=$self->{obj_dir}",
|
||||||
"CPPFLAGS_DRIVER=-D".uc($self->{name}),
|
"CPPFLAGS_DRIVER=-D".uc($self->{name}),
|
||||||
|
|
@ -816,7 +817,7 @@ sub compile {
|
||||||
($param{benchmark}?"OPT_FAST=-O2":""),
|
($param{benchmark}?"OPT_FAST=-O2":""),
|
||||||
"$self->{VM_PREFIX}", # bypass default rule, as we don't need archive
|
"$self->{VM_PREFIX}", # bypass default rule, as we don't need archive
|
||||||
($param{make_flags}||""),
|
($param{make_flags}||""),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -824,7 +825,7 @@ sub compile {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($param{make_pli}) {
|
if ($param{make_pli}) {
|
||||||
$self->oprint("Compile vpi\n");
|
$self->oprint("Compile vpi\n") if $self->{verbose};
|
||||||
my @cmd = ('c++', @{$param{pli_flags}}, "-DIS_VPI", "$self->{t_dir}/$self->{name}.cpp");
|
my @cmd = ('c++', @{$param{pli_flags}}, "-DIS_VPI", "$self->{t_dir}/$self->{name}.cpp");
|
||||||
|
|
||||||
$self->_run(logfile=>"$self->{obj_dir}/pli_compile.log",
|
$self->_run(logfile=>"$self->{obj_dir}/pli_compile.log",
|
||||||
|
|
@ -840,7 +841,10 @@ sub execute {
|
||||||
return 1 if $self->errors || $self->skips || $self->unsupporteds;
|
return 1 if $self->errors || $self->skips || $self->unsupporteds;
|
||||||
my %param = (%{$self}, @_); # Default arguments are from $self
|
my %param = (%{$self}, @_); # Default arguments are from $self
|
||||||
# params may be expect or {tool}_expect
|
# params may be expect or {tool}_expect
|
||||||
$self->oprint("Run\n");
|
$self->oprint("Run\n") if $self->{verbose};
|
||||||
|
|
||||||
|
delete $ENV{SYSTEMC_DISABLE_COPYRIGHT_MESSAGE};
|
||||||
|
$ENV{SYSTEMC_DISABLE_COPYRIGHT_MESSAGE} = "DISABLE" if !$self->{verbose};
|
||||||
|
|
||||||
my $run_env = $param{run_env};
|
my $run_env = $param{run_env};
|
||||||
$run_env .= ' ' if $run_env;
|
$run_env .= ' ' if $run_env;
|
||||||
|
|
@ -956,7 +960,7 @@ sub inline_checks {
|
||||||
my $covfn = $Self->{coverage_filename};
|
my $covfn = $Self->{coverage_filename};
|
||||||
my $contents = $self->file_contents($covfn);
|
my $contents = $self->file_contents($covfn);
|
||||||
|
|
||||||
$self->oprint("Extract checks\n");
|
$self->oprint("Extract checks\n") if $self->{verbose};
|
||||||
my $fh = IO::File->new("<$self->{top_filename}");
|
my $fh = IO::File->new("<$self->{top_filename}");
|
||||||
while (defined(my $line = $fh->getline)) {
|
while (defined(my $line = $fh->getline)) {
|
||||||
if ($line =~ /CHECK/) {
|
if ($line =~ /CHECK/) {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,9 @@ module t (/*AUTOARG*/
|
||||||
$stop;
|
$stop;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
`ifdef TEST_VERBOSE
|
||||||
$write("Addr=%d datao_check=%d datao=%d\n", addr, datao_check, datao);
|
$write("Addr=%d datao_check=%d datao=%d\n", addr, datao_check, datao);
|
||||||
|
`endif
|
||||||
// only run the first 10 addresses for now
|
// only run the first 10 addresses for now
|
||||||
if (addr > 10) begin
|
if (addr > 10) begin
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue