Added RENDERCHECK_FORMATS variable to user_parameters.sample.sh

Submitted by Humberto Perez on Nov. 21, 2017, 2:36 p.m.

Details

Message ID 20171121143630.13593-1-humberto.i.perez.rodriguez@intel.com
State New
Series "Added RENDERCHECK_FORMATS variable to user_parameters.sample.sh"
Headers show

Commit Message

Humberto Perez Nov. 21, 2017, 2:36 p.m.
From: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com>

Changes on this revision :
- added RENDERCHECK_FORMATS variable to user_parameters.sh.sample
in order to be able to configure from a single format to all
availables by rendercheck (so far rendercheck has 23 formats)
- in rendercheck.test file was replaced the hardcoded formats for
RENDERCHECK_FORMATS variable
---
 tests.d/x11/rendercheck.test | 3 ++-
 user_parameters.sh.sample    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests.d/x11/rendercheck.test b/tests.d/x11/rendercheck.test
index 80af3e7..e0bd906 100644
--- a/tests.d/x11/rendercheck.test
+++ b/tests.d/x11/rendercheck.test
@@ -2,11 +2,12 @@  test_name="x11:rendercheck"
 test_type="unified"
 
 RENDERCHECK="$RENDERCHECK_FOLDER/rendercheck"
+RENDERCHECK_FORMATS="${RENDERCHECK_FORMATS:-a8r8g8b8,x8r8g8b8}"
 
 [ -e "$RENDERCHECK" ] || return 1
 
 x11:rendercheck_run() {
-    run_bench 0 "$RENDERCHECK" -r -f a8r8g8b8,x8r8g8b8 2>&1 > /dev/null | grep "^## " | sed 's/## \(.*\): \+\(.*\)/\1: str(\2)/g'
+    run_bench 0 "$RENDERCHECK" -r -f "$RENDERCHECK_FORMATS" 2>&1 > /dev/null | grep "^## " | sed 's/## \(.*\): \+\(.*\)/\1: str(\2)/g'
 
     # Go through all the subtests we wanted to get and check if all of them
     # are present. If not, mark them as missing.
diff --git a/user_parameters.sh.sample b/user_parameters.sh.sample
index 27481b0..1c010e3 100644
--- a/user_parameters.sh.sample
+++ b/user_parameters.sh.sample
@@ -146,6 +146,7 @@  WATCHDOG_TIMEOUT_REBOOT=120
 # Rendercheck: From https://cgit.freedesktop.org/~mperes/rendercheck/
 # Must point to the directory containing the 'rendercheck' binary
 RENDERCHECK_FOLDER=/opt/benchmarks/rendercheck/
+RENDERCHECK_FORMATS="a8r8g8b8,x8r8g8b8"
 
 # cairo-demos settings
 CAIRO_DEMOS=/opt/benchmarks/cairo-demos

Comments

Martin Peres Nov. 22, 2017, 10:13 a.m.
On 21/11/17 16:36, Humberto Perez wrote:
> From: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com>
> 
> Changes on this revision :
> - added RENDERCHECK_FORMATS variable to user_parameters.sh.sample
> in order to be able to configure from a single format to all
> availables by rendercheck (so far rendercheck has 23 formats)
> - in rendercheck.test file was replaced the hardcoded formats for
> RENDERCHECK_FORMATS variable

Thanks for the rework. I reworked the commit title and pushed it :)

> ---
>  tests.d/x11/rendercheck.test | 3 ++-
>  user_parameters.sh.sample    | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests.d/x11/rendercheck.test b/tests.d/x11/rendercheck.test
> index 80af3e7..e0bd906 100644
> --- a/tests.d/x11/rendercheck.test
> +++ b/tests.d/x11/rendercheck.test
> @@ -2,11 +2,12 @@ test_name="x11:rendercheck"
>  test_type="unified"
>  
>  RENDERCHECK="$RENDERCHECK_FOLDER/rendercheck"
> +RENDERCHECK_FORMATS="${RENDERCHECK_FORMATS:-a8r8g8b8,x8r8g8b8}"
>  
>  [ -e "$RENDERCHECK" ] || return 1
>  
>  x11:rendercheck_run() {
> -    run_bench 0 "$RENDERCHECK" -r -f a8r8g8b8,x8r8g8b8 2>&1 > /dev/null | grep "^## " | sed 's/## \(.*\): \+\(.*\)/\1: str(\2)/g'
> +    run_bench 0 "$RENDERCHECK" -r -f "$RENDERCHECK_FORMATS" 2>&1 > /dev/null | grep "^## " | sed 's/## \(.*\): \+\(.*\)/\1: str(\2)/g'
>  
>      # Go through all the subtests we wanted to get and check if all of them
>      # are present. If not, mark them as missing.
> diff --git a/user_parameters.sh.sample b/user_parameters.sh.sample
> index 27481b0..1c010e3 100644
> --- a/user_parameters.sh.sample
> +++ b/user_parameters.sh.sample
> @@ -146,6 +146,7 @@ WATCHDOG_TIMEOUT_REBOOT=120
>  # Rendercheck: From https://cgit.freedesktop.org/~mperes/rendercheck/
>  # Must point to the directory containing the 'rendercheck' binary
>  RENDERCHECK_FOLDER=/opt/benchmarks/rendercheck/
> +RENDERCHECK_FORMATS="a8r8g8b8,x8r8g8b8"
>  
>  # cairo-demos settings
>  CAIRO_DEMOS=/opt/benchmarks/cairo-demos
>