From patchwork Thu Apr 25 19:08:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 16412 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 695132395D for ; Thu, 25 Apr 2013 19:10:24 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id 11sf5748128vbe.7 for ; Thu, 25 Apr 2013 12:09:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :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 :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=yuo+kc9fJkpIMG5ONpzU48XkHDpRl442etYM0k5tFHU=; b=m3DfRwY+ImhtJVRKOWJbdcx5bRLy5hEboNdao//5AvPp8VtlvCl8ZnN0ZadIPbNiuR vvVLbzd/Yka4mw9hm+ixANv+ycmbzh/g9/InvIj4lL+XS+LGnoc8omzdLlt6F0c8N56/ TiKXeKjLc/i6pCAj+dpZBeA3DPocug5jkJQ04o+APlZJ0/tSptEV1MTlL3jshdylAiJ7 FZZSHnUXEs9QJbbvrF7+BsQqyVBkFAw0XGb3JnxsEKvn32VW+b0GL4a6GvTgkV+kiXsu yFmoe6MVsQqp1eHxtCvFtd5oMOUA1fqLlVA6XkRPVIvWZPCpppqdTTN27PHYI+ywTqdQ xRBg== X-Received: by 10.224.185.17 with SMTP id cm17mr13936666qab.6.1366916970534; Thu, 25 Apr 2013 12:09:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.63.33 with SMTP id d1ls1494655qes.88.gmail; Thu, 25 Apr 2013 12:09:30 -0700 (PDT) X-Received: by 10.58.85.134 with SMTP id h6mr27871438vez.18.1366916970401; Thu, 25 Apr 2013 12:09:30 -0700 (PDT) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [2607:f8b0:400c:c01::231]) by mx.google.com with ESMTPS id pq1si3861915vec.11.2013.04.25.12.09.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 12:09:30 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::231; Received: by mail-ve0-f177.google.com with SMTP id cy12so1438142veb.8 for ; Thu, 25 Apr 2013 12:09:30 -0700 (PDT) X-Received: by 10.58.181.201 with SMTP id dy9mr27825187vec.34.1366916970284; Thu, 25 Apr 2013 12:09:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp36423veb; Thu, 25 Apr 2013 12:09:29 -0700 (PDT) X-Received: by 10.43.9.68 with SMTP id ov4mr22800587icb.22.1366916969572; Thu, 25 Apr 2013 12:09:29 -0700 (PDT) Received: from mail-ia0-x22c.google.com (mail-ia0-x22c.google.com [2607:f8b0:4001:c02::22c]) by mx.google.com with ESMTPS id be5si10944888icc.31.2013.04.25.12.09.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 12:09:29 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c02::22c is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=2607:f8b0:4001:c02::22c; Received: by mail-ia0-f172.google.com with SMTP id i20so3063482ian.3 for ; Thu, 25 Apr 2013 12:09:29 -0700 (PDT) X-Received: by 10.50.40.162 with SMTP id y2mr26495137igk.65.1366916969284; Thu, 25 Apr 2013 12:09:29 -0700 (PDT) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPSA id wx2sm14271525igb.4.2013.04.25.12.09.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 12:09:28 -0700 (PDT) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 2/2] gles3: Add outerProduct tests to generated_tests Date: Thu, 25 Apr 2013 14:08:58 -0500 Message-Id: <1366916938-8860-2-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366916938-8860-1-git-send-email-tom.gall@linaro.org> References: <1366916938-8860-1-git-send-email-tom.gall@linaro.org> X-Gm-Message-State: ALoCoQnFNUxwBo0MuOTO6y6vuq718MxZyUI3MU3yWi97RGKjpe90HXrMi0CEAQHcaNivUK18aARq X-Original-Sender: tom.gall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , GL SL ES 3.00 added outerProduct as a built in fuction. http://www.khronos.org/opengles/sdk/docs/manglsl/xhtml/outerProduct.xml Add a script which generates testcases which validate the variety of valid and invalid parameters that may be passed. The script is called as part of the generated_tests. Signed-off-by: Tom Gall --- generated_tests/CMakeLists.txt | 14 +++ generated_tests/outerProduct-invalid-parameters.sh | 91 ++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100755 generated_tests/outerProduct-invalid-parameters.sh diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt index db3734f..58ff0af 100644 --- a/generated_tests/CMakeLists.txt +++ b/generated_tests/CMakeLists.txt @@ -18,6 +18,16 @@ function(piglit_make_generated_tests file_list generator_script) VERBATIM) endfunction(piglit_make_generated_tests custom_target generator_script) +function(piglit_make_sh_generated_tests file_list generator_sh_script version) + # Add a custom command which executes ${generator_script} + # during the build. + add_custom_command( + OUTPUT ${file_list} + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${generator_sh_script} ${version} > ${file_list} + DEPENDS ${generator_sh_script} ${ARGN} + VERBATIM) +endfunction(piglit_make_sh_generated_tests custom_target generator_sh_script) + # Create custom commands and targets to build generated tests. piglit_make_generated_tests( builtin_packing_tests.list @@ -54,6 +64,9 @@ piglit_make_generated_tests( piglit_make_generated_tests( builtin_cl_int_tests.list generate-cl-int-builtins.py) +piglit_make_sh_generated_tests( + outerProduct-invalid-parameters_tests.list + outerProduct-invalid-parameters.sh 3.00) # Add a "gen-tests" target that can be used to generate all the # tests without doing any other compilation. @@ -64,5 +77,6 @@ add_custom_target(gen-tests ALL builtin_cl_int_tests.list interpolation_tests.list non-lvalue_tests.list + outerProduct-invalid-parameters_tests.list texture_query_lod_tests.list uniform-initializer_tests.list) diff --git a/generated_tests/outerProduct-invalid-parameters.sh b/generated_tests/outerProduct-invalid-parameters.sh new file mode 100755 index 0000000..7def598 --- /dev/null +++ b/generated_tests/outerProduct-invalid-parameters.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +function emit_vs +{ + targetdir=$1 + t=$2 + + echo "$targetdir/outerProduct-$t.vert" + cat > $targetdir/outerProduct-$t.vert < $targetdir/outerProduct-$t.vert < $targetdir/outerProduct-$t.vert <