From patchwork Tue Jan 22 03:50:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14202 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9BC6623E2E for ; Tue, 22 Jan 2013 03:51:01 +0000 (UTC) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by fiordland.canonical.com (Postfix) with ESMTP id 419AEA18B04 for ; Tue, 22 Jan 2013 03:51:01 +0000 (UTC) Received: by mail-vb0-f41.google.com with SMTP id l22so2403876vbn.0 for ; Mon, 21 Jan 2013 19:51:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=dhuwcoKperktz4whobAlQyz+BLUVyxXjr4fu3eDx6Ng=; b=laooaVOFGGzoM2cFwjT/wpCKh9K590yS88eRUc0AIW1oLQ1CHjWJQYE4AWckgMGIyk s8GnCRSHAmr6IH3WYSePHs+1u6o9cKRwJ8kXcGPwVHE3c7f66XJ44F32q8wsps/hBodS IKCfWLBHxKTr05i02ZJstDrvu1Id3f2pzQAGF616gA2RLUO8J3Sh5UArOELzD9Givysl /WVO8zY1SqdGfr5g8cQ8IUMCzaqxpZwv+ZuvDfukCB1URyU6Yt1uka+PV2hzqBdqTc7s MyPAsP3JnYnYytUh9jF2/XR5SzG6cQs+v+AOk/6G7i9YZdrt4r1gRCnWWmHoTT+syowg ZDtA== X-Received: by 10.52.16.6 with SMTP id b6mr16397798vdd.40.1358826660532; Mon, 21 Jan 2013 19:51:00 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp232198veb; Mon, 21 Jan 2013 19:50:59 -0800 (PST) X-Received: by 10.42.131.133 with SMTP id z5mr13487540ics.10.1358826658974; Mon, 21 Jan 2013 19:50:58 -0800 (PST) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) by mx.google.com with ESMTPS id dc3si13141458igb.56.2013.01.21.19.50.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 19:50:58 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.171 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=209.85.223.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.223.171 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) smtp.mail=tom.gall@linaro.org Received: by mail-ie0-f171.google.com with SMTP id 9so7152185iec.2 for ; Mon, 21 Jan 2013 19:50:58 -0800 (PST) X-Received: by 10.50.159.228 with SMTP id xf4mr10903517igb.108.1358826657879; Mon, 21 Jan 2013 19:50:57 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id e9sm10009971igp.11.2013.01.21.19.50.55 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 19:50:56 -0800 (PST) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 1/2] shader_runner.py Update regex to detect new require section syntax Date: Mon, 21 Jan 2013 21:50:44 -0600 Message-Id: <1358826645-31350-1-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlr3pj0iQ6TJm7PT22lwkmf9qUI+etGiA3+1wUUBooYhPBJ83pxRVsfO62l3VkVeeToiDYd With commit dadf56dad25730556e36e9446aabfc80458cc12f the syntax for the [require] section in the shader test data files changed for GL ES. This patch, updates the shader_runner.py regex to also understand the new syntax since this code parses the [require] section of the shader test data file to determine which shader_runner binary to run. When dispatch is implemented for GLES all this can go away. v2: formatting, better description, no GLSL ES, GLSL detection. Signed-off-by: Tom Gall Reviewed-by: Stuart Abercrombie --- framework/shader_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/shader_test.py b/framework/shader_test.py index 335a6c1..03478fc 100755 --- a/framework/shader_test.py +++ b/framework/shader_test.py @@ -107,16 +107,16 @@ class ShaderTest(PlainExecTest): common = { 'cmp' : r'(<|<=|=|>=|>)', 'gl_version' : r'(\d.\d)', - 'gles2_version' : r'(2.\d\s+es)', - 'gles3_version' : r'(3.\d\s+es)', + 'gles2_version' : r'(2.\d\s)', + 'gles3_version' : r'(3.\d\s)', 'comment' : r'(#.*)', } cls.__re_require_header = re.compile(r'^\s*\[require\]\s*{comment}?$'.format(**common)) cls.__re_end_require_block = re.compile(r'^\s*\['.format(*common)) cls.__re_gl = re.compile(r'^\s*GL\s*{cmp}\s*{gl_version}\s*{comment}?$'.format(**common)) - cls.__re_gles2 = re.compile(r'^\s*GL\s*{cmp}\s*{gles2_version}\s*{comment}?$'.format(**common)) - cls.__re_gles3 = re.compile(r'^\s*GL\s*{cmp}\s*{gles3_version}\s*{comment}?$'.format(**common)) + cls.__re_gles2 = re.compile(r'^\s*GL ES\s*{cmp}\s*{gles2_version}\s*{comment}?$'.format(**common)) + cls.__re_gles3 = re.compile(r'^\s*GL ES\s*{cmp}\s*{gles3_version}\s*{comment}?$'.format(**common)) cls.__re_gl_unknown = re.compile(r'^\s*GL\s*{cmp}'.format(**common)) def __init__(self, shader_runner_args, run_standalone=False):