From patchwork Fri Nov 27 12:40:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Feceoru, Gabriel" X-Patchwork-Id: 7713121 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 37352BF90C for ; Fri, 27 Nov 2015 12:34:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 590AC205FC for ; Fri, 27 Nov 2015 12:33:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4F80C205F9 for ; Fri, 27 Nov 2015 12:33:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD6676E27D; Fri, 27 Nov 2015 04:33:57 -0800 (PST) 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 B5B456E27D for ; Fri, 27 Nov 2015 04:33:56 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 27 Nov 2015 04:33:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,351,1444719600"; d="scan'208";a="608012845" Received: from gfeceoru-ms-7924.rb.intel.com ([10.237.105.33]) by FMSMGA003.fm.intel.com with ESMTP; 27 Nov 2015 04:33:55 -0800 From: Gabriel Feceoru To: intel-gfx@lists.freedesktop.org Date: Fri, 27 Nov 2015 14:40:36 +0200 Message-Id: <1448628036-7410-1-git-send-email-gabriel.feceoru@intel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] scripts: Add support to retest tests wich changed results 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: , 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 This script takes multiple test results and prints the diffs, useful for detecting noise in subsequent executions. It gives the option to re-run these tests. Signed-off-by: Gabriel Feceoru --- scripts/retest-diff.sh | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 scripts/retest-diff.sh diff --git a/scripts/retest-diff.sh b/scripts/retest-diff.sh new file mode 100755 index 0000000..aee1d05 --- /dev/null +++ b/scripts/retest-diff.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# +# 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. + +ROOT="`dirname $0`" +ROOT="`readlink -f $ROOT/..`" +IGT_TEST_ROOT="$ROOT/tests" +RESULTS="$ROOT/results" +PIGLIT="$ROOT/piglit/piglit" + +if [ ! -d "$IGT_TEST_ROOT" ]; then + echo "Error: could not find tests directory." + exit 1 +fi + +function print_help { + echo "Usage: $0 [ ...]" + echo "" +} + + +if [ $# -lt 2 ]; then + print_help + exit 1 +fi + +RESULT_FILES=$@ + +for result in $RESULT_FILES; do + if [ ! -e $result ]; then + echo "Wrong result paths" + exit 1 + fi +done + + +TESTS=`$PIGLIT summary console -d $RESULT_FILES | grep igt | cut -d':' -f1` +if [[ -z $TESTS ]]; then + exit 1 +else + RED='\033[0;31m' + NC='\033[0m' + printf "$RED $TESTS $NC " | sed -e 's/ /\n/g' +fi + + +read -p "Dow you want to run these tests [y/N]? " -n 2 -r +if [[ $REPLY =~ ^[Yy]$ ]]; then + mkdir -p $RESULTS + TEST_LIST=($TESTS) + TEST_PARAMS=`printf "%s " "${TEST_LIST[@]/#/-t }"` + sudo IGT_TEST_ROOT=$IGT_TEST_ROOT $PIGLIT run igt $RESULTS $TEST_PARAMS +fi