From patchwork Fri Feb 26 12:52:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 588933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2557B14012C for ; Fri, 26 Feb 2016 23:53:02 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=tieto.com header.i=@tieto.com header.b=EGYY2gOC; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZHst-00076i-IL; Fri, 26 Feb 2016 12:52:39 +0000 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZHsq-00072g-UB for hostap@lists.infradead.org; Fri, 26 Feb 2016 12:52:38 +0000 Received: by mail-lf0-x235.google.com with SMTP id l143so52706319lfe.2 for ; Fri, 26 Feb 2016 04:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=VJUoBRSFsxre19p/0mmQL4TzbSoZhwOHyqSUIt+yRQg=; b=EGYY2gOCshfmKujjyUsLlKjCOa5jrhAwiHHavIn2622Q3secYqrTgFdmgM1Y6wuSMO z5Mg5+hS+cwRxqwicOor4i7jqhDLY3nrGITFqFNpNkOuCB3fF6YF7WEXQ3owzrMMi4B+ AgID5GXhvD20iKDU/0yh5KFviBoSo9Hq/4t7Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VJUoBRSFsxre19p/0mmQL4TzbSoZhwOHyqSUIt+yRQg=; b=Fr0BA5mPSt+G3oGE8ClUFjJ9XEhxoRzFADw6ErhZY11S03OWqyqm0FN9MOaKtwxUTw IYeS1PTHSOFbz6uZWRYIvChwbsSU0vs/qgRlYrDDIqLv3tfsQwJwn/R7O6KnmIb3yVe9 Rv14C/fwvKqQLJlkdspizNroJOM+BQR9+9KHbR7R2OHAYy6AUy0km3oAHiuck0BrzaJI DBHoq8n+CYO8LqhEH340BpmbJ0gEevxqYkQtUmD4T4ViDh8Mry65uPkwPHkUx+rcbqbz BRkevlZ9i7ps9Vh4EDg1NslGCyFfMjGEA/iFFFRxknBd4REkbvknriw3f1wLMLYib+8/ fWJg== X-Gm-Message-State: AD7BkJJHieDABCOlBPnA1B4OGPHU2H/bG2G0hopmfnFR+r2FpQDfXOv4plaqWXg6f5cugvurOO/3Wfxz+Y6CsfCR3plqGQAhGUnTmEZE7Rm/aHH8RFrnOXWhwd/1HttzoetQUZbalOWAJGcd+yDUX8ib6vee2Y2fIUmt/4HrAVl7qE7TAidbnZ7l/M8xwd3IMtkq X-Received: by 10.25.20.28 with SMTP id k28mr585111lfi.152.1456491135102; Fri, 26 Feb 2016 04:52:15 -0800 (PST) Received: from dell6430.guest.wifi ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id jr10sm1788601lbc.42.2016.02.26.04.52.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Feb 2016 04:52:14 -0800 (PST) From: Janusz Dziedzic To: hostap@lists.infradead.org Subject: [PATCH v4 29A/29] tests/remote: add key filter to tests we should run Date: Fri, 26 Feb 2016 13:52:07 +0100 Message-Id: <1456491127-14523-1-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160226_045237_369008_9F4A5F14 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: j@w1.fi, Janusz Dziedzic MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add -k (--key=) support. This base on regular expression. So we can run tests based on the filter. Signed-off-by: Janusz Dziedzic --- tests/remote/run-tests.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/remote/run-tests.py b/tests/remote/run-tests.py index 61e7f3f..927bed0 100755 --- a/tests/remote/run-tests.py +++ b/tests/remote/run-tests.py @@ -71,8 +71,10 @@ def main(): dut = None ref = None requested_tests = ["help"] + filtered_tests = [] log_dir = "./logs/" verbose = False + filter_key = None # get env configuration setup_params = config.get_setup_params() @@ -80,7 +82,7 @@ def main(): # parse input parameters try: - opts, args = getopt.getopt(sys.argv[1:], "d:r:t:l:v", ["dut=", "ref=", "tests=", "log_dir="]) + opts, args = getopt.getopt(sys.argv[1:], "d:r:t:l:k:v", ["dut=", "ref=", "tests=", "log_dir=", "key="]) except getopt.GetoptError as err: print(err) usage() @@ -97,6 +99,8 @@ def main(): requested_tests = re.split('; | |, ', argument) elif option in ("-l", "--log_dir"): log_dir = argument + elif option in ("-k", "--key"): + filter_key = argument else: assert False, "unhandled option" @@ -161,6 +165,13 @@ def main(): show_devices(devices, setup_params) return + # filter + if filter_key: + for test in tests: + if re.search(filter_key, test.__name__): + filtered_tests.append(test) + tests = filtered_tests + # setup test we should run tests_to_run = [] if requested_tests[0] == "all":