From c17a9eb5f13047120d1bbcb8e714ebefed9d5319 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 26 Oct 2017 07:34:02 -0400 Subject: [PATCH] Tests: Fix driver when VERILATOR_ROOT not set. --- test_regress/driver.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 099b6d939..8ba9533ad 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -3,14 +3,17 @@ ###################################################################### require 5.006_001; +use Cwd; BEGIN { if ($ENV{DIRPROJECT} && $ENV{DIRPROJECT_PERL_BOOT}) { # Magic to allow author testing of perl packages in local directory require $ENV{DIRPROJECT}."/".$ENV{DIRPROJECT_PERL_BOOT}; } + if (!$ENV{VERILATOR_ROOT} && -x "../bin/verilator") { + $ENV{VERILATOR_ROOT} = Cwd::getcwd()."/.."; + } } -use Cwd; use Getopt::Long; use IO::File; use Pod::Usage;