From: Mike Mason Subject: [PATCH v2 i-g-t 1/1] scripts: Allow multiple -t and -x regular expressions for run-tests.sh Date: Mon, 18 Aug 2014 10:43:09 -0700 Message-ID: <1408383789-1889-1-git-send-email-michael.w.mason@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 652C76E148 for ; Mon, 18 Aug 2014 10:41:36 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Piglit allows multiple -t and -x regular expressions to be given on the command line. This patch enables run-tests.sh to support that as well. Signed-off-by: Mike Mason --- scripts/run-tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index cf77473..d0e0c67 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -55,8 +55,10 @@ function print_help { echo " (default: $RESULTS)" echo " -s create html summary" echo " -t only include tests that match the regular expression" + echo " (can be used more than once)" echo " -v enable verbose mode" echo " -x exclude tests that match the regular expression" + echo " (can be used more than once)" echo "" echo "Useful patterns for test filtering are described in tests/NAMING-CONVENTION" } @@ -78,9 +80,9 @@ while getopts ":dhlr:st:vx:" opt; do l) list_tests; exit ;; r) RESULTS="$OPTARG" ;; s) SUMMARY="html" ;; - t) FILTER="-t $OPTARG" ;; + t) FILTER="$FILTER -t $OPTARG" ;; v) VERBOSE="-v" ;; - x) EXCLUDE="-x $OPTARG" ;; + x) EXCLUDE="$EXCLUDE -x $OPTARG" ;; :) echo "Option -$OPTARG requires an argument." exit 1 -- 1.9.1