From 02e948f283e0ab3902f4f2875a3c8f9a6922a17c Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Fri, 10 May 2019 10:48:40 -0400 Subject: [PATCH] test runner automatically handles tests with top-level module inside both inputs --- test/basic/enum_tb.v | 1 - test/basic/named_block_tb.v | 1 - test/basic/package_tb.v | 1 - test/basic/packed_array_shadow_tb.v | 1 - test/basic/part_select_tb.v | 1 - test/basic/struct_shadow_tb.v | 1 - test/basic/tf_block_tb.v | 1 - test/basic/top_tf_tb.v | 1 - test/lex/run.sh | 1 - test/lib/runner.sh | 12 +++++++----- 10 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 test/basic/enum_tb.v delete mode 100644 test/basic/named_block_tb.v delete mode 100644 test/basic/package_tb.v delete mode 100644 test/basic/packed_array_shadow_tb.v delete mode 100644 test/basic/part_select_tb.v delete mode 100644 test/basic/struct_shadow_tb.v delete mode 100644 test/basic/tf_block_tb.v delete mode 100644 test/basic/top_tf_tb.v diff --git a/test/basic/enum_tb.v b/test/basic/enum_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/enum_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/named_block_tb.v b/test/basic/named_block_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/named_block_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/package_tb.v b/test/basic/package_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/package_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/packed_array_shadow_tb.v b/test/basic/packed_array_shadow_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/packed_array_shadow_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/part_select_tb.v b/test/basic/part_select_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/part_select_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/struct_shadow_tb.v b/test/basic/struct_shadow_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/struct_shadow_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/tf_block_tb.v b/test/basic/tf_block_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/tf_block_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/basic/top_tf_tb.v b/test/basic/top_tf_tb.v deleted file mode 100644 index d11c69f..0000000 --- a/test/basic/top_tf_tb.v +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/test/lex/run.sh b/test/lex/run.sh index 42da475..c9d5ade 100755 --- a/test/lex/run.sh +++ b/test/lex/run.sh @@ -1,3 +1,2 @@ #!/bin/bash -NO_SEPARATE_TBS=1 source ../lib/runner.sh diff --git a/test/lib/runner.sh b/test/lib/runner.sh index 78576fd..8fa3b04 100644 --- a/test/lib/runner.sh +++ b/test/lib/runner.sh @@ -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