[7/8] variable-index-write.sh: echo generated testcase name and formalize output directory target

Message ID 1366524583-25982-7-git-send-email-tom.gall@linaro.org
State New
Headers show

Commit Message

Tom Gall April 21, 2013, 6:09 a.m.
Adjust shell script so it echos the name of the generated testcase and output the
generated testcases using the following pattern:

"spec/glsl"${es}-${version}"/execution/varible-index-write"

This uses the convention followed by the other scripts that generate testcases.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
---
 generated_tests/variable-index-write.sh |   98 +++++++++++++++++++------------
 1 file changed, 61 insertions(+), 37 deletions(-)

Comments

Eric Anholt May 9, 2013, 12:07 a.m. | #1
Tom Gall <tom.gall@linaro.org> writes:

> Adjust shell script so it echos the name of the generated testcase and output the
> generated testcases using the following pattern:
>
> "spec/glsl"${es}-${version}"/execution/varible-index-write"
>
> This uses the convention followed by the other scripts that generate testcases.
>
> Signed-off-by: Tom Gall <tom.gall@linaro.org>
> ---
>  generated_tests/variable-index-write.sh |   98 +++++++++++++++++++------------
>  1 file changed, 61 insertions(+), 37 deletions(-)
>
> diff --git a/generated_tests/variable-index-write.sh b/generated_tests/variable-index-write.sh
> index 06802c4..52cd24e 100755
> --- a/generated_tests/variable-index-write.sh
> +++ b/generated_tests/variable-index-write.sh
> @@ -450,6 +450,14 @@ else
>      esac
>  fi
>  
> +v=${version/./}
> +if [ $v -eq 100 ]; then
> +	es="-es"
> +fi
> +
> +filepath="spec/glsl"${es}-${version}"/execution/varible-index-write"
> +mkdir -p ${filepath}
> +
>  for mode in temp varying; do
>      # More than 3 is unlikely to work for the varying tests due to using too
>      # many varying vectors.  mat4[3] uses 12 varying vectors by itself.
> @@ -465,57 +473,73 @@ for mode in temp varying; do
>  	for matrix_dim in 2 3 4; do
>  	    # Fragment shaders cannot write varyings
>  	    if [ "x$mode" != "xvarying" ]; then
> -		emit_fs_wr_test $matrix_dim $array_dim $mode index col float \
> -		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test
> -
> -		emit_fs_wr_test $matrix_dim $array_dim $mode index 1   float \
> -		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test
> -
> -		emit_fs_wr_test $matrix_dim $array_dim $mode index col vec${matrix_dim} \
> -		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test
> -
> -		emit_fs_wr_test $matrix_dim $array_dim $mode index 1   vec${matrix_dim} \
> -		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test
> -
> -		if [ $array_dim -ne 0 ]; then
> -		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 col float \
> -			> fs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test
> -
> -		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 1   float \
> -			> fs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test
> -
> -		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 col vec${matrix_dim} \
> -			> fs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test
> -
> -		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 1   vec${matrix_dim} \
> -			> fs-${mode}-${arr}mat${matrix_dim}-wr.shader_test
> -		fi
> +			emit_fs_wr_test $matrix_dim $array_dim $mode index col float \
> +		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test
> +			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test"
> +
> +			emit_fs_wr_test $matrix_dim $array_dim $mode index 1   float \
> +		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test
> +			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test"
> +
> +			emit_fs_wr_test $matrix_dim $array_dim $mode index col vec${matrix_dim} \
> +		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test
> +			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test"
> +
> +			emit_fs_wr_test $matrix_dim $array_dim $mode index 1   vec${matrix_dim} \
> +		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test
> +			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test"

This all appears to have incorrectly been indented an additional level.

Other than that, I'm almost happy with the series, especially the
filtered-out patch 8 (removing checkin of generated code).  In the
future, please trim giant, automatically-generated patches like that to
some human-understandable subset in the diff, with the diffstat still
present and a note to tell us what's you did.  To give people something
to apply, just use --compose to tell us about where you git tree is.

This minor indentation thing and the PIGLIT_ATTRIB_POS question on patch
1 are the only blocking issues I see.

Patch

diff --git a/generated_tests/variable-index-write.sh b/generated_tests/variable-index-write.sh
index 06802c4..52cd24e 100755
--- a/generated_tests/variable-index-write.sh
+++ b/generated_tests/variable-index-write.sh
@@ -450,6 +450,14 @@  else
     esac
 fi
 
+v=${version/./}
+if [ $v -eq 100 ]; then
+	es="-es"
+fi
+
+filepath="spec/glsl"${es}-${version}"/execution/varible-index-write"
+mkdir -p ${filepath}
+
 for mode in temp varying; do
     # More than 3 is unlikely to work for the varying tests due to using too
     # many varying vectors.  mat4[3] uses 12 varying vectors by itself.
@@ -465,57 +473,73 @@  for mode in temp varying; do
 	for matrix_dim in 2 3 4; do
 	    # Fragment shaders cannot write varyings
 	    if [ "x$mode" != "xvarying" ]; then
-		emit_fs_wr_test $matrix_dim $array_dim $mode index col float \
-		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test
-
-		emit_fs_wr_test $matrix_dim $array_dim $mode index 1   float \
-		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test
-
-		emit_fs_wr_test $matrix_dim $array_dim $mode index col vec${matrix_dim} \
-		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test
-
-		emit_fs_wr_test $matrix_dim $array_dim $mode index 1   vec${matrix_dim} \
-		    > fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test
-
-		if [ $array_dim -ne 0 ]; then
-		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 col float \
-			> fs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test
-
-		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 1   float \
-			> fs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test
-
-		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 col vec${matrix_dim} \
-			> fs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test
-
-		    emit_fs_wr_test $matrix_dim $array_dim $mode 1 1   vec${matrix_dim} \
-			> fs-${mode}-${arr}mat${matrix_dim}-wr.shader_test
-		fi
+			emit_fs_wr_test $matrix_dim $array_dim $mode index col float \
+		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test
+			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test"
+
+			emit_fs_wr_test $matrix_dim $array_dim $mode index 1   float \
+		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test
+			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test"
+
+			emit_fs_wr_test $matrix_dim $array_dim $mode index col vec${matrix_dim} \
+		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test
+			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test"
+
+			emit_fs_wr_test $matrix_dim $array_dim $mode index 1   vec${matrix_dim} \
+		    > ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test
+			echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test"
+
+			if [ $array_dim -ne 0 ]; then
+				emit_fs_wr_test $matrix_dim $array_dim $mode 1 col float \
+				> ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test
+				echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test"
+
+				emit_fs_wr_test $matrix_dim $array_dim $mode 1 1   float \
+				> ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test
+				echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test"
+
+				emit_fs_wr_test $matrix_dim $array_dim $mode 1 col vec${matrix_dim} \
+				> ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test
+				echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test"
+
+				emit_fs_wr_test $matrix_dim $array_dim $mode 1 1   vec${matrix_dim} \
+				> ${filepath}/fs-${mode}-${arr}mat${matrix_dim}-wr.shader_test
+				echo "${filepath}/fs-${mode}-${arr}mat${matrix_dim}-wr.shader_test"
+			fi
 	    fi
 
 	    emit_vs_wr_test $matrix_dim $array_dim $mode index col float \
-		> vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test
+		> ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test
+		echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-row-wr.shader_test"
 
 	    emit_vs_wr_test $matrix_dim $array_dim $mode index 1   float \
-		> vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test
+		> ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test
+		echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}row-wr.shader_test"
 
 	    emit_vs_wr_test $matrix_dim $array_dim $mode index col vec${matrix_dim} \
-		> vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test
+		> ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test
+		echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}col-wr.shader_test"
 
 	    emit_vs_wr_test $matrix_dim $array_dim $mode index 1   vec${matrix_dim} \
-		> vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test
+		> ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test
+		echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-${idx_txt}wr.shader_test"
 
 	    if [ $array_dim -ne 0 ]; then
-		emit_vs_wr_test $matrix_dim $array_dim $mode 1 col float \
-		    > vs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test
+			emit_vs_wr_test $matrix_dim $array_dim $mode 1 col float \
+		    > ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test
+			echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-col-row-wr.shader_test"
 
-		emit_vs_wr_test $matrix_dim $array_dim $mode 1 1   float \
-		    > vs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test
+			emit_vs_wr_test $matrix_dim $array_dim $mode 1 1   float \
+		    > ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test
+			echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-row-wr.shader_test"
 
-		emit_vs_wr_test $matrix_dim $array_dim $mode 1 col vec${matrix_dim} \
-		    > vs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test
+			emit_vs_wr_test $matrix_dim $array_dim $mode 1 col vec${matrix_dim} \
+		    > ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test
+			echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-col-wr.shader_test"
 
-		emit_vs_wr_test $matrix_dim $array_dim $mode 1 1   vec${matrix_dim} \
-		    > vs-${mode}-${arr}mat${matrix_dim}-wr.shader_test
+			emit_vs_wr_test $matrix_dim $array_dim $mode 1 1   vec${matrix_dim} \
+		    > ${filepath}/vs-${mode}-${arr}mat${matrix_dim}-wr.shader_test
+			echo "${filepath}/vs-${mode}-${arr}mat${matrix_dim}-wr.shader_test"
 	    fi
 	done
     done