test runner automatically handles tests with top-level module inside both inputs

This commit is contained in:
Zachary Snow 2019-05-10 10:48:40 -04:00
parent 3bef2b9cdb
commit 02e948f283
10 changed files with 7 additions and 14 deletions

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1 +0,0 @@
// intentionally empty

View File

@ -1,3 +1,2 @@
#!/bin/bash
NO_SEPARATE_TBS=1
source ../lib/runner.sh

View File

@ -66,16 +66,18 @@ assertConverts() {
simpleTest() {
sv="$1"
ve="$2"
if [ -z ${NO_SEPARATE_TBS} ]; then
tb="$3"
else
tb="$SCRIPT_DIR/empty.v"
fi
tb="$3"
assertNotNull "SystemVerilog file not specified" $sv
assertNotNull "Verilog file not specified" $ve
assertNotNull "Testbench not specified" $tb
# some tests don't have a separate testbench, instead having the top-level
# module defined in both of the input files
if [ ! -f "$tb" ]; then
tb="$SCRIPT_DIR/empty.v"
fi
assertExists $sv
assertExists $ve
assertExists $tb