commit cde544b29d344a5c884ca3948d1826520308a353 from: Omar Polo date: Fri Feb 17 08:40:02 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 - 0e0165f13a58bad062d9761626c1b3ba82df671c commit + cde544b29d344a5c884ca3948d1826520308a353 blob - 96339d43615d5d8fad7e4a300f64c7db2dc9cea8 blob + 4febc6122401f6f47ac76d69b9db67f578229f64 --- 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" @@ -241,11 +243,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