commit f81387acdb3205ee8b204cb77539b1a5e0f7a0ca from: Omar Polo via: Thomas Adam date: Fri Feb 17 16:23:18 2023 UTC regress: allow to run only a subset of the test cases This allows to run only the test cases named on the command line. commit - b12113433f340204dc187ae46213e4ec0439db26 commit + f81387acdb3205ee8b204cb77539b1a5e0f7a0ca blob - de03ac23d77bc68db8468d312559b0ddd55d651c blob + c23f2eb8cc647a24c8fabef126aef9f16e768ee0 --- regress/cmdline/common.sh +++ regress/cmdline/common.sh @@ -14,6 +14,8 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +regress_run_only="" + export GIT_AUTHOR_NAME="Flan Hacker" export GIT_AUTHOR_EMAIL="flan_hacker@openbsd.org" export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" @@ -307,11 +309,21 @@ test_parseargs() ;; esac done + shift $(($OPTIND - 1)) + regress_run_only="$@" } >&2 run_test() { testfunc="$1" + + if [ -n "$regress_run_only" ]; then + case "$regress_run_only" in + *$testfunc*) ;; + *) return ;; + esac + fi + if [ -z "$GOT_TEST_QUIET" ]; then echo -n "$testfunc " fi