diff --git a/Makefile b/Makefile index fb0ad0e37..1f8a47470 100644 --- a/Makefile +++ b/Makefile @@ -866,6 +866,7 @@ MK_TEST_DIRS += tests/arch/nexus MK_TEST_DIRS += tests/arch/quicklogic/pp3 MK_TEST_DIRS += tests/arch/quicklogic/qlf_k6n10f MK_TEST_DIRS += tests/arch/xilinx +MK_TEST_DIRS += tests/bugpoint MK_TEST_DIRS += tests/opt MK_TEST_DIRS += tests/sat MK_TEST_DIRS += tests/sim diff --git a/passes/cmds/bugpoint.cc b/passes/cmds/bugpoint.cc index f740c2bcd..683430372 100644 --- a/passes/cmds/bugpoint.cc +++ b/passes/cmds/bugpoint.cc @@ -77,7 +77,7 @@ struct BugpointPass : public Pass { log(" -runner \"\"\n"); log(" child process wrapping command, e.g., \"timeout 30\", or valgrind.\n"); log("\n"); - log(" -err_grep \"\"\n"); + log(" -err-grep \"\"\n"); log(" only consider crashes that print this string on stderr. useful for\n"); log(" errors outside of yosys.\n"); log("\n"); @@ -474,7 +474,7 @@ struct BugpointPass : public Pass { grep = args[++argidx]; continue; } - if (args[argidx] == "-err_grep" && argidx + 1 < args.size()) { + if (args[argidx] == "-err-grep" && argidx + 1 < args.size()) { has_check = true; check_err = true; err_grep = args[++argidx]; diff --git a/tests/bugpoint/err.ys b/tests/bugpoint/err.ys index 08bf0a9c7..42e84241c 100644 --- a/tests/bugpoint/err.ys +++ b/tests/bugpoint/err.ys @@ -38,6 +38,6 @@ select -assert-mod-count 1 zzy # raise_error -stderr prints to stderr and exits with 1 design -load read rename top abc -bugpoint -yosys ../../yosys -command "raise_error -stderr" -err_grep "help me" -expect-return 1 +bugpoint -yosys ../../yosys -command "raise_error -stderr" -err-grep "help me" -expect-return 1 select -assert-mod-count 1 =* select -assert-mod-count 1 other diff --git a/tests/bugpoint/run-test.sh b/tests/bugpoint/run-test.sh new file mode 100755 index 000000000..006c731e3 --- /dev/null +++ b/tests/bugpoint/run-test.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -eu +source ../gen-tests-makefile.sh +generate_mk --yosys-scripts