Skip to content

Commit 7a3e124

Browse files
committed
dependency_support/com_icarus_iverilog: fix scripts for cocotb tests
1 parent 0bc7113 commit 7a3e124

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dependency_support/com_icarus_iverilog/iverilog.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ dir="$0.runfiles/com_icarus_iverilog"
2222
vvp_dir="${0/%iverilog/vvp}.runfiles/com_icarus_iverilog"
2323

2424
if [[ ! -d "$dir" ]]; then
25-
echo "Unable to find dependencies (looking under $dir)." 1>&2
26-
exit 1
25+
dir=$(dirname $0) # use current directory it not launched directly from the :iverilog target.
26+
fi
27+
if [[ ! -d "$vvp_dir" ]]; then
28+
vvp_dir=$(dirname $0) # use current directory it not launched directly from the :iverilog target.
2729
fi
2830

2931
exec "$dir/iverilog-bin" -B"$dir" -BM"$vvp_dir" -DIVERILOG "$@"

dependency_support/com_icarus_iverilog/vvp.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
set -eu
2020

2121
dir="$0.runfiles/com_icarus_iverilog"
22-
2322
if [[ ! -d "$dir" ]]; then
24-
echo "Unable to find dependencies (looking under $dir)." 1>&2
25-
exit 1
23+
dir=$(dirname $0) # use current directory it not launched directly from the :vvp target.
2624
fi
2725

2826
exec "$dir/vvp-bin" -M"$dir" "$@"

0 commit comments

Comments
 (0)