From patchwork Thu Sep 17 11:42:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 7206201 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4AEC79F380 for ; Thu, 17 Sep 2015 11:52:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64C3A207B7 for ; Thu, 17 Sep 2015 11:52:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 36794207B1 for ; Thu, 17 Sep 2015 11:52:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8343D6E2CD; Thu, 17 Sep 2015 04:52:11 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EEB26E243 for ; Thu, 17 Sep 2015 04:52:10 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 17 Sep 2015 04:52:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,546,1437462000"; d="scan'208";a="771038184" Received: from otc-vmt1.isw.intel.com ([10.237.224.80]) by orsmga001.jf.intel.com with ESMTP; 17 Sep 2015 04:52:09 -0700 From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Thu, 17 Sep 2015 12:42:44 +0100 Message-Id: <1442490164-16728-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442333264-20869-1-git-send-email-thomas.wood@intel.com> References: <1442333264-20869-1-git-send-email-thomas.wood@intel.com> Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Subject: [Intel-gfx] [PATCH i-g-t v2] scripts: add quick-testlist.py X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a script to take a piglit results file and create a list of tests that ran in under 60 seconds. This list can be used by the --test-list option of piglit. v2: exclude incomplete tests Signed-off-by: Thomas Wood --- scripts/quick-testlist.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 scripts/quick-testlist.py diff --git a/scripts/quick-testlist.py b/scripts/quick-testlist.py new file mode 100755 index 0000000..0dd4c69 --- /dev/null +++ b/scripts/quick-testlist.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# +# Copyright 2015 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +from __future__ import print_function +import json +import sys + +def filter_results(filename): + with open(filename) as data: + json_data = json.load(data) + + for test_name in json_data["tests"]: + if json_data["tests"][test_name]["result"] == "incomplete": + continue + if json_data["tests"][test_name]["time"] < 60: + print(test_name) + + +if len(sys.argv) < 2: + print("Usage: quick-testlist.py RESULTS") + print("Read piglit results from RESULTS and print the tests that executed" + " in under 60 seconds, excluding any incomplete tests. The list can" + " be used by the --test-list option of piglit.") + sys.exit(1) + +filter_results(sys.argv[1])