All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Upgrade piglit, compress generated tests
@ 2016-12-12 13:35 Jussi Kukkonen
  2016-12-12 13:35 ` [PATCH 1/3] piglit: Package tests in compressed form as well Jussi Kukkonen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-12 13:35 UTC (permalink / raw)
  To: openembedded-core

These patches were already on the list in another patchset, the only
change is that piglit-generated-tests now RDEPENDS on tar.

Original cover letter follows:


Piglit was removed because the current version was making sdk
images too large. This patchset reduces the installed size by 1.5GB
and adds piglit back to core-tools-testapps.

Running piglit still requires the same amount of space so in practice
this is useful for installed images only.

Thanks,
 Jussi


The following changes since commit 36e178a62f04e7f2611b26964efe46b9af97189a:

  linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.8 (2016-12-09 08:54:07 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib jku/piglit-compress-tests
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/piglit-compress-tests

Jussi Kukkonen (3):
  piglit: Package tests in compressed form as well
  core-tools-testapps: Re-add piglit
  piglit: Upgrade to current master head

 .../packagegroup-core-tools-testapps.bb            |  2 +
 .../0001-cmake-Link-test-utils-with-ldl.patch      | 41 ----------------
 ...0001-cmake-Link-utils-with-xcb-explicitly.patch | 54 ----------------------
 meta/recipes-graphics/piglit/piglit/piglit.sh      | 20 ++++++++
 meta/recipes-graphics/piglit/piglit_git.bb         | 27 +++++++++--
 5 files changed, 44 insertions(+), 100 deletions(-)
 delete mode 100644 meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
 delete mode 100644 meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
 create mode 100644 meta/recipes-graphics/piglit/piglit/piglit.sh

-- 
2.1.4



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

* [PATCH 1/3] piglit: Package tests in compressed form as well
  2016-12-12 13:35 [PATCH 0/3] Upgrade piglit, compress generated tests Jussi Kukkonen
@ 2016-12-12 13:35 ` Jussi Kukkonen
  2017-01-13 10:52   ` Nicolas Dechesne
  2016-12-12 13:35 ` [PATCH 2/3] core-tools-testapps: Re-add piglit Jussi Kukkonen
  2016-12-12 13:35 ` [PATCH 3/3] piglit: Upgrade to current master head Jussi Kukkonen
  2 siblings, 1 reply; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-12 13:35 UTC (permalink / raw)
  To: openembedded-core

Modify packaging so that generated tests are available in two forms:
* piglit-generated-tests contains the tests as they are now (1.5GB
  when installed)
* piglit-generated-tests-compressed contains a tar.gz with the same
  files (45 MB when installed)

Add wrapper script that decompresses the tests at runtime: this
requires 1.5GB free space.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-graphics/piglit/piglit/piglit.sh | 20 ++++++++++++++++++++
 meta/recipes-graphics/piglit/piglit_git.bb    | 21 ++++++++++++++++++++-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/piglit/piglit/piglit.sh

diff --git a/meta/recipes-graphics/piglit/piglit/piglit.sh b/meta/recipes-graphics/piglit/piglit/piglit.sh
new file mode 100644
index 0000000..3308b70
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/piglit.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# If we're using compressed generated tests we may need to
+# decompress first. This is going to require at least 1.5 GB of space
+if [[ /usr/lib/piglit/generated_tests.tar.gz -nt /usr/lib/piglit/generated_tests/ ]]; then
+    echo "Decompressing generated tests..."
+    tar -C /usr/lib/piglit/ -zxf /usr/lib/piglit/generated_tests.tar.gz || {
+        echo "Failed to decompress tests, exiting."
+        exit 1
+    }
+    touch /usr/lib/piglit/generated_tests
+fi
+
+if ! [[ -d /usr/lib/piglit/generated_tests ]]; then
+    echo "NOTE: No generated tests found, install piglit-generated-tests-compressed"
+    echo "      or piglit-generated-tests to include them in the tests."
+fi
+
+echo "Now running piglit..."
+PIGLIT_NO_WINDOW=1 piglit.real "$@"
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 82adcde..63f9f17 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -7,6 +7,7 @@ SRC_URI = "git://anongit.freedesktop.org/piglit \
            file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
            file://0001-cmake-Link-utils-with-xcb-explicitly.patch \
            file://0001-cmake-Link-test-utils-with-ldl.patch \
+           file://piglit.sh \
            "
 
 # From 2016-07-07
@@ -39,9 +40,14 @@ do_configure_prepend() {
 }
 
 do_install() {
-	oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
+    oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
+    mv ${D}${bindir}/piglit ${D}${bindir}/piglit.real
+    install -m 755 ${WORKDIR}/piglit.sh ${D}${bindir}/piglit
+    tar -C ${D}${libdir}/piglit/ -czf ${D}${libdir}/piglit/generated_tests.tar.gz generated_tests/
 }
 
+PACKAGES =+ "${PN}-generated-tests ${PN}-generated-tests-compressed"
+
 RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
 	python3-subprocess python3-misc python3-importlib \
 	python3-unixadmin python3-xml python3-multiprocessing \
@@ -50,3 +56,16 @@ RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
 	"
 
 INSANE_SKIP_${PN} += "dev-so already-stripped"
+
+SUMMARY_${PN}-generated-tests = "Generated piglit tests (multiple GB)"
+FILES_${PN}-generated-tests = "${libdir}/piglit/generated_tests/*"
+CONFLICTS_${PN}-generated-tests = "${PN}-generated-tests-compressed"
+RDEPENDS_${PN}-generated-tests += "tar"
+
+SUMMARY_${PN}-generated-tests-compressed = "Generated piglit tests in compressed archive"
+FILES_${PN}-generated-tests-compressed = "${libdir}/piglit/generated_tests.tar.gz"
+CONFLICTS_${PN}-generated-tests-compressed = "${PN}-generated-tests"
+pkg_postrm_${PN}-generated-tests-compressed () {
+    rm -rf $D${libdir}/piglit/generated_tests/
+}
+
-- 
2.1.4



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

* [PATCH 2/3] core-tools-testapps: Re-add piglit
  2016-12-12 13:35 [PATCH 0/3] Upgrade piglit, compress generated tests Jussi Kukkonen
  2016-12-12 13:35 ` [PATCH 1/3] piglit: Package tests in compressed form as well Jussi Kukkonen
@ 2016-12-12 13:35 ` Jussi Kukkonen
  2016-12-12 13:35 ` [PATCH 3/3] piglit: Upgrade to current master head Jussi Kukkonen
  2 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-12 13:35 UTC (permalink / raw)
  To: openembedded-core

Piglit was removed from testapps in 9e227ecb3a because it made
sdk images massive. Add piglit back now that the installed size is
no longer humongous: it still needs 1.5 GB free space at runtime but
the image sizes stay reasonable.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 3170978..69cfd57 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -17,6 +17,8 @@ KEXECTOOLS_nios2 ?= ""
 
 X11GLTOOLS = "\
     mesa-demos \
+    piglit \
+    piglit-generated-tests-compressed \
     "
 
 3GTOOLS = "\
-- 
2.1.4



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

* [PATCH 3/3] piglit: Upgrade to current master head
  2016-12-12 13:35 [PATCH 0/3] Upgrade piglit, compress generated tests Jussi Kukkonen
  2016-12-12 13:35 ` [PATCH 1/3] piglit: Package tests in compressed form as well Jussi Kukkonen
  2016-12-12 13:35 ` [PATCH 2/3] core-tools-testapps: Re-add piglit Jussi Kukkonen
@ 2016-12-12 13:35 ` Jussi Kukkonen
  2 siblings, 0 replies; 5+ messages in thread
From: Jussi Kukkonen @ 2016-12-12 13:35 UTC (permalink / raw)
  To: openembedded-core

Remove upstreamed patches.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 .../0001-cmake-Link-test-utils-with-ldl.patch      | 41 ----------------
 ...0001-cmake-Link-utils-with-xcb-explicitly.patch | 54 ----------------------
 meta/recipes-graphics/piglit/piglit_git.bb         |  6 +--
 3 files changed, 2 insertions(+), 99 deletions(-)
 delete mode 100644 meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
 delete mode 100644 meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch

diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
deleted file mode 100644
index 2e1c947..0000000
--- a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Backport patch to fix build with gold linker.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Backport
-
-
-
-From 93a7113485cf1c55fd7076116faf5b3a690706b2 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 30 Aug 2016 17:17:28 +0300
-Subject: [PATCH] cmake: Link test utils with "-ldl"
-
-Without this linking CXX executables (e.g. fbo-blit-stretch) fails
-with gold linker:
-
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
----
- tests/util/CMakeLists.txt | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index e1f8073..3d5bef5 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -11,6 +11,8 @@ set_source_files_properties(
- 	PROPERTIES GENERATED 1
- 	)
- 
-+link_libraries(${CMAKE_DL_LIBS})
-+
- if(HAVE_LIBCACA)
-     link_libraries(caca)
- endif()
--- 
-2.9.3
-
diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch b/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
deleted file mode 100644
index 845804d..0000000
--- a/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 73e4fbc5777eddd89bb0fb16e90343551fe3e0ef Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 5 Jul 2016 10:56:23 +0300
-Subject: [PATCH] cmake: Link utils with xcb explicitly
-
-Linking with g++ can reportedly lead to:
-
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'
-
-This may have appeared now because xcb-dri2 used to overlink publicly
-but now does not.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Accepted
----
- CMakeLists.txt            | 1 +
- tests/util/CMakeLists.txt | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8e2abba..2e1a473 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -151,6 +151,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- 
- 	pkg_check_modules(LIBDRM QUIET libdrm)
- 	pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
-+	pkg_check_modules(XCB QUIET xcb)
- 	pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
- 	pkg_check_modules(GLPROTO QUIET glproto)
- ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index fb22ffa..e1f8073 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -121,11 +121,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- 
- 		list(APPEND UTIL_GL_LIBS
- 			${LIBDRM_LDFLAGS}
-+			${XCB_LDFLAGS}
- 			${XCB_DRI2_LDFLAGS}
- 		)
- 
- 		list(APPEND UTIL_GL_INCLUDES
- 			${LIBDRM_INCLUDE_DIRS}
-+			${XCB_INCLUDE_DIRS}
- 			${XCB_DRI2_INCLUDE_DIRS}
- 		)
- 
--- 
-2.1.4
-
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 63f9f17..21d9677 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -5,13 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
 SRC_URI = "git://anongit.freedesktop.org/piglit \
            file://0001-cmake-install-bash-completions-in-the-right-place.patch \
            file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
-           file://0001-cmake-Link-utils-with-xcb-explicitly.patch \
-           file://0001-cmake-Link-test-utils-with-ldl.patch \
            file://piglit.sh \
            "
 
-# From 2016-07-07
-SRCREV = "c39e41a86551eb390b8da23232dc8577639403d0"
+# Head of master 2016-11-16
+SRCREV = "1619c37a88770c9c0d8467939e34ffd337241c14"
 # (when PV goes above 1.0 remove the trailing r)
 PV = "1.0+gitr${SRCPV}"
 
-- 
2.1.4



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

* Re: [PATCH 1/3] piglit: Package tests in compressed form as well
  2016-12-12 13:35 ` [PATCH 1/3] piglit: Package tests in compressed form as well Jussi Kukkonen
@ 2017-01-13 10:52   ` Nicolas Dechesne
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Dechesne @ 2017-01-13 10:52 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer

On Mon, Dec 12, 2016 at 2:35 PM, Jussi Kukkonen
<jussi.kukkonen@intel.com> wrote:
> Modify packaging so that generated tests are available in two forms:
> * piglit-generated-tests contains the tests as they are now (1.5GB
>   when installed)
> * piglit-generated-tests-compressed contains a tar.gz with the same
>   files (45 MB when installed)
>
> Add wrapper script that decompresses the tests at runtime: this
> requires 1.5GB free space.
>
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>

What is the status of this patch? looks like a good thing to get
afaik. is there anything needed to get it merged?

thx!


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

end of thread, other threads:[~2017-01-13 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 13:35 [PATCH 0/3] Upgrade piglit, compress generated tests Jussi Kukkonen
2016-12-12 13:35 ` [PATCH 1/3] piglit: Package tests in compressed form as well Jussi Kukkonen
2017-01-13 10:52   ` Nicolas Dechesne
2016-12-12 13:35 ` [PATCH 2/3] core-tools-testapps: Re-add piglit Jussi Kukkonen
2016-12-12 13:35 ` [PATCH 3/3] piglit: Upgrade to current master head Jussi Kukkonen

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.