aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tools/autotest.sh2
-rw-r--r--tests/various/script.ys17
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh
index 7b64b357f..4d3478628 100755
--- a/tests/tools/autotest.sh
+++ b/tests/tools/autotest.sh
@@ -157,7 +157,7 @@ do
fi
if [ ! -f ../${bn}_tb.v ]; then
- "$toolsdir"/../../yosys -f "$frontend $include_opts" -b "test_autotb $autotb_opts" -o ${bn}_tb.v ${bn}_ref.${refext}
+ "$toolsdir"/../../yosys -f "$frontend $include_opts -D_AUTOTB" -b "test_autotb $autotb_opts" -o ${bn}_tb.v ${bn}_ref.${refext}
else
cp ../${bn}_tb.v ${bn}_tb.v
fi
diff --git a/tests/various/script.ys b/tests/various/script.ys
new file mode 100644
index 000000000..6044ad9b3
--- /dev/null
+++ b/tests/various/script.ys
@@ -0,0 +1,17 @@
+read_verilog -formal <<EOT
+ module top;
+ foo bar();
+ foo asdf();
+ winnie the_pooh();
+
+ wire [1023:0] _RUNME0 = "select -assert-count 2 t:foo";
+ wire [1023:0] _RUNME1 = "select -assert-count 1 t:winnie";
+ wire [1023:0] _DELETE = "delete c:bar";
+ endmodule
+EOT
+
+script -select w:_RUNME*
+
+select w:_DELETE
+script -select
+select -assert-count 1 t:foo