From patchwork Tue Dec 4 15:51:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10712139 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 689A113AF for ; Tue, 4 Dec 2018 15:52:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B9C82C1DF for ; Tue, 4 Dec 2018 15:52:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A0942C1F4; Tue, 4 Dec 2018 15:52:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC2042C1D7 for ; Tue, 4 Dec 2018 15:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbeLDPv6 (ORCPT ); Tue, 4 Dec 2018 10:51:58 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:33638 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbeLDPv6 (ORCPT ); Tue, 4 Dec 2018 10:51:58 -0500 Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 06AD7E2E; Tue, 4 Dec 2018 16:51:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1543938713; bh=8OBza3eMqqqm9qH5ALUYGyuQT5hAzO6LefasHwJUASU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ntyEqWvM4wJnc83+m6K+FuP9b7/ABV7Fr4UD1j7hU+2CDDWrhULRp64zxKEOjMbTx Jjl6WkVeOdK9pcRMUsjoxwA6dV7E1mHe1KABRUZYXHoT6pQ2CLgvCgCs31l5YjbstC LRqQy3omZ6YD1GQAoeWY5J15fUNwJzVuQ34Em2gw= From: Kieran Bingham To: Laurent Pinchart Cc: Kieran Bingham , linux-renesas-soc@vger.kernel.org, Kieran Bingham Subject: [VSP-Tests PATCH 5/7] vsp-lib: Allow forcing pixel perfect comparisons Date: Tue, 4 Dec 2018 15:51:44 +0000 Message-Id: <20181204155146.9726-6-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181204155146.9726-1-kieran.bingham@ideasonboard.com> References: <20181204155146.9726-1-kieran.bingham@ideasonboard.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide a means for the tester to request pixel perfect matches on tests. This can be either through setting the environment variable VSP_PIXEL_PERFECT, or by passing either '-p' or '--pixel-perfect' on the test command line. Signed-off-by: Kieran Bingham --- scripts/vsp-lib.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index cf15a045ea8c..9140254c7459 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -287,7 +287,11 @@ compare_frames() { params=${params//)/_} params=$pipe-$in_fmt-$out_fmt-$size$params - if [ x$__vsp_pixel_perfect != xtrue ] ; then + # The system can hint when pixel-perfection is not supported, + # however the user can override to force this requirement with + # VSP_PIXEL_PERFECT=1 in the environment or by passing -p, or + # --pixel-perfect on the commandline. + if [ x$__vsp_pixel_perfect != xtrue -a x$VSP_PIXEL_PERFECT != x1 ] ; then method=fuzzy fi @@ -1113,10 +1117,15 @@ case $1 in export VSP_KEEP_FRAMES=1 shift ;; + -p|--pixel-perfect) + export VSP_PIXEL_PERFECT=1 + shift + ;; -h|--help) echo "$(basename $0): VSP Test library" echo " -x|--debug enable shell debug" echo " -k|--keep-frames keep generated and captured frames" + echo " -p|--pixel-perfect frames must match with pixel perfection" echo " -h|--help this help" exit shift