code coverage cleanup
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
This commit is contained in:
parent
f331c0c801
commit
ce17da9a58
|
|
@ -3603,16 +3603,14 @@ void VerilatedContextImp::commandArgVl(const std::string& arg) {
|
|||
// and the run can be reproduced by passing +verilator+seed+<that_value>.
|
||||
if (u64 == 0) u64 = pickRandomSeed();
|
||||
randSeed(static_cast<int>(u64));
|
||||
} else if (0
|
||||
== std::strncmp(arg.c_str(), "+verilator+vpi+",
|
||||
std::strlen("+verilator+vpi+"))) {
|
||||
} else if (commandArgVlString(arg, "+verilator+vpi+", str)) {
|
||||
// With --vpi the generated --main (vl_load_vpi_libs) consumes this, so accept
|
||||
// it silently here. Without --vpi there is no loader, so warn it is ignored.
|
||||
#if !VM_VPI
|
||||
VL_WARN_MT(
|
||||
"COMMAND_LINE", 0, "",
|
||||
("+verilator+vpi+ ignored: simulation was not compiled with --vpi '" + arg + "'")
|
||||
.c_str());
|
||||
.c_str()); // LCOV_EXCL_LINE (gcov zeroes this wrapped continuation line)
|
||||
#endif
|
||||
} else if (arg == "+verilator+V") {
|
||||
VerilatedImp::versionDump(); // Someday more info too
|
||||
|
|
|
|||
|
|
@ -32,7 +32,12 @@ else:
|
|||
# Run the generated binary; load the VPI library via the +verilator+vpi+ plusarg.
|
||||
# The VPI library's output (observed 'count' reaching MAX_TICKS, then end-of-sim) is
|
||||
# checked against the golden .out file.
|
||||
test.execute(all_run_flags=["+verilator+vpi+" + test.obj_dir + "/libvpi.so"],
|
||||
# Also pass a non-VPI plusarg (skipped by the loader's prefix check) and a bare
|
||||
# +verilator+vpi+ with an empty payload (skipped by the empty-arg check), so both
|
||||
# loader-skip branches are exercised alongside the real library load.
|
||||
test.execute(all_run_flags=[
|
||||
"+othertest", "+verilator+vpi+", "+verilator+vpi+" + test.obj_dir + "/libvpi.so"
|
||||
],
|
||||
check_finished=True,
|
||||
expect_filename=test.golden_filename)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue