All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-arago][master/kirkstone][PATCH] piglit: add conditional config to point at deqp bins
@ 2023-06-20 23:09 rs
  2023-06-20 23:22 ` Randolph Sapp
  0 siblings, 1 reply; 2+ messages in thread
From: rs @ 2023-06-20 23:09 UTC (permalink / raw)
  To: denis, reatmon, afd; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

Add a PACKAGECONFIG to define runtime dependencies on deqp tests and
conditionally set values for the default config so piglit works out of
the box.

Adjust the arago.conf accordingly. Drop the explicit requirements for
individual cts tests in ti-test-extras.

Signed-off-by: Randolph Sapp <rs@ti.com>
---

Not sure how I feel about this patch. Feel free to tear it to shreds if
it's a bad idea.

 meta-arago-distro/conf/distro/arago.conf      |  6 +++-
 .../recipes-core/packagegroups/ti-test.bb     |  2 --
 .../recipes-graphics/piglit/piglit_%.bbappend | 30 +++++++++++++++++++
 3 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend

diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
index f770345c..512bc175 100644
--- a/meta-arago-distro/conf/distro/arago.conf
+++ b/meta-arago-distro/conf/distro/arago.conf
@@ -99,7 +99,11 @@ PACKAGECONFIG:pn-glmark2 = "drm-gles2 wayland-gles2"
 PACKAGECONFIG:pn-weston-init = ""
 
 # Enable testing for opencl and vulkan with piglit
-PACKAGECONFIG:append:pn-piglit = " ${@bb.utils.filter("DISTRO_FEATURES", "opencl vulkan", d)}"
+PACKAGECONFIG:append:pn-piglit = " \
+    ${@bb.utils.filter("DISTRO_FEATURES", "opencl vulkan", d)} \
+    ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "deqp-gles", "", d)} \
+    ${@bb.utils.contains("DISTRO_FEATURES", "vulkan", "deqp-vk", "", d)} \
+"
 PACKAGECONFIG:pn-opengl-es-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "surfaceless", d)}"
 PACKAGECONFIG:pn-vulkan-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "surfaceless", d)}"
 
diff --git a/meta-arago-distro/recipes-core/packagegroups/ti-test.bb b/meta-arago-distro/recipes-core/packagegroups/ti-test.bb
index 793eb583..11c327a0 100644
--- a/meta-arago-distro/recipes-core/packagegroups/ti-test.bb
+++ b/meta-arago-distro/recipes-core/packagegroups/ti-test.bb
@@ -43,8 +43,6 @@ ARAGO_TEST = "\
 ARAGO_TEST_EXTRAS = " \
     python3-numpy \
     piglit \
-    ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl-es-cts", "", d)} \
-    ${@bb.utils.contains("DISTRO_FEATURES", "vulkan", "vulkan-cts", "", d)} \
 "
 
 ARAGO_TEST:append:armv7a = " \
diff --git a/meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend b/meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend
new file mode 100644
index 00000000..e4cb9525
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend
@@ -0,0 +1,30 @@
+# add a config to point piglit at the default install location for deqp tests
+# if they are selected
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+PACKAGECONFIG[deqp-gles] = ",,,opengl-es-cts"
+PACKAGECONFIG[deqp-vk] = ",,,vulkan-cts"
+
+do_install:append() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'deqp-gles', 'true', 'false', d)}; then
+        printf "%s\n" \
+            "[deqp-egl]" \
+            "bin=/usr/lib/opengl-es-cts/deqp-egl" \
+            "[deqp-gles2]" \
+            "bin=/usr/lib/opengl-es-cts/deqp-gles2" \
+            "[deqp-gles3]" \
+            "bin=/usr/lib/opengl-es-cts/deqp-gles3" \
+            "[deqp-gles31]" \
+            "bin=/usr/lib/opengl-es-cts/deqp-gles31" \
+            >> ${D}/usr/lib/piglit/piglit.conf
+    fi
+    if ${@bb.utils.contains('PACKAGECONFIG', 'deqp-vk', 'true', 'false', d)}; then
+        printf "%s\n" \
+            "[deqp-vk]" \
+            "bin=/usr/lib/vulkan-cts/deqp-vk" \
+            "[deqp-vksc]" \
+            "bin=/usr/lib/vulkan-cts/deqp-vksc" \
+            >> ${D}/usr/lib/piglit/piglit.conf
+    fi
+}
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-arago][master/kirkstone][PATCH] piglit: add conditional config to point at deqp bins
  2023-06-20 23:09 [meta-arago][master/kirkstone][PATCH] piglit: add conditional config to point at deqp bins rs
@ 2023-06-20 23:22 ` Randolph Sapp
  0 siblings, 0 replies; 2+ messages in thread
From: Randolph Sapp @ 2023-06-20 23:22 UTC (permalink / raw)
  To: denis, reatmon, afd; +Cc: meta-arago

On 6/20/23 18:09, rs@ti.com wrote:
> From: Randolph Sapp <rs@ti.com>
> 
> Add a PACKAGECONFIG to define runtime dependencies on deqp tests and
> conditionally set values for the default config so piglit works out of
> the box.
> 
> Adjust the arago.conf accordingly. Drop the explicit requirements for
> individual cts tests in ti-test-extras.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
> 
> Not sure how I feel about this patch. Feel free to tear it to shreds if
> it's a bad idea.
> 
>   meta-arago-distro/conf/distro/arago.conf      |  6 +++-
>   .../recipes-core/packagegroups/ti-test.bb     |  2 --
>   .../recipes-graphics/piglit/piglit_%.bbappend | 30 +++++++++++++++++++
>   3 files changed, 35 insertions(+), 3 deletions(-)
>   create mode 100644 meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend
> 
> diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
> index f770345c..512bc175 100644
> --- a/meta-arago-distro/conf/distro/arago.conf
> +++ b/meta-arago-distro/conf/distro/arago.conf
> @@ -99,7 +99,11 @@ PACKAGECONFIG:pn-glmark2 = "drm-gles2 wayland-gles2"
>   PACKAGECONFIG:pn-weston-init = ""
>   
>   # Enable testing for opencl and vulkan with piglit
> -PACKAGECONFIG:append:pn-piglit = " ${@bb.utils.filter("DISTRO_FEATURES", "opencl vulkan", d)}"
> +PACKAGECONFIG:append:pn-piglit = " \
> +    ${@bb.utils.filter("DISTRO_FEATURES", "opencl vulkan", d)} \
> +    ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "deqp-gles", "", d)} \
> +    ${@bb.utils.contains("DISTRO_FEATURES", "vulkan", "deqp-vk", "", d)} \
> +"
>   PACKAGECONFIG:pn-opengl-es-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "surfaceless", d)}"
>   PACKAGECONFIG:pn-vulkan-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "surfaceless", d)}"
>   
> diff --git a/meta-arago-distro/recipes-core/packagegroups/ti-test.bb b/meta-arago-distro/recipes-core/packagegroups/ti-test.bb
> index 793eb583..11c327a0 100644
> --- a/meta-arago-distro/recipes-core/packagegroups/ti-test.bb
> +++ b/meta-arago-distro/recipes-core/packagegroups/ti-test.bb
> @@ -43,8 +43,6 @@ ARAGO_TEST = "\
>   ARAGO_TEST_EXTRAS = " \
>       python3-numpy \
>       piglit \
> -    ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl-es-cts", "", d)} \
> -    ${@bb.utils.contains("DISTRO_FEATURES", "vulkan", "vulkan-cts", "", d)} \
>   "
>   
>   ARAGO_TEST:append:armv7a = " \
> diff --git a/meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend b/meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend
> new file mode 100644
> index 00000000..e4cb9525
> --- /dev/null
> +++ b/meta-arago-distro/recipes-graphics/piglit/piglit_%.bbappend
> @@ -0,0 +1,30 @@
> +# add a config to point piglit at the default install location for deqp tests
> +# if they are selected
> +
> +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
> +
> +PACKAGECONFIG[deqp-gles] = ",,,opengl-es-cts"
> +PACKAGECONFIG[deqp-vk] = ",,,vulkan-cts"
> +
> +do_install:append() {
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'deqp-gles', 'true', 'false', d)}; then
> +        printf "%s\n" \
> +            "[deqp-egl]" \
> +            "bin=/usr/lib/opengl-es-cts/deqp-egl" \
> +            "[deqp-gles2]" \
> +            "bin=/usr/lib/opengl-es-cts/deqp-gles2" \
> +            "[deqp-gles3]" \
> +            "bin=/usr/lib/opengl-es-cts/deqp-gles3" \
> +            "[deqp-gles31]" \
> +            "bin=/usr/lib/opengl-es-cts/deqp-gles31" \
> +            >> ${D}/usr/lib/piglit/piglit.conf

Should have just tagged this as an RFC apparently. Forgot to use ${libdir}.

> +    fi
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'deqp-vk', 'true', 'false', d)}; then
> +        printf "%s\n" \
> +            "[deqp-vk]" \
> +            "bin=/usr/lib/vulkan-cts/deqp-vk" \
> +            "[deqp-vksc]" \
> +            "bin=/usr/lib/vulkan-cts/deqp-vksc" \
> +            >> ${D}/usr/lib/piglit/piglit.conf

Same here.

> +    fi
> +}



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-20 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-20 23:09 [meta-arago][master/kirkstone][PATCH] piglit: add conditional config to point at deqp bins rs
2023-06-20 23:22 ` Randolph Sapp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.