Skip to contentSkip to conversation

Re-add piglit to sdk images

PATCH In review Jussi Kukkonen 6 participants 9 messages Oct 14, 2016 – Oct 19, 2016

lore
Share & tools
lore
#0 lore raw

cover Re-add piglit to sdk images

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.

Q: Do I need to declare a runtime dependency that typically comes from busybox (tar)?

Thanks,
Jussi

The following changes since commit 371ab635086e2878ada1f00a59c7ec826481ba0a:

build-appliance-image: Update to master head revision (2016-10-11 23:43:28 +0100)

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 (2):
piglit: Package tests in compressed form as well
core-tools-testapps: Re-add piglit

 .../packagegroup-core-tools-testapps.bb              |  2 ++
 meta/recipes-graphics/piglit/piglit/piglit.sh        | 20 ++++++++++++++++++++
 meta/recipes-graphics/piglit/piglit_git.bb           | 20 +++++++++++++++++++-
 3 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/piglit/piglit/piglit.sh
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/2 piglit: Package tests in compressed form as well

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.

---
 meta/recipes-graphics/piglit/piglit/piglit.sh | 20 ++++++++++++++++++++
 meta/recipes-graphics/piglit/piglit_git.bb    | 20 +++++++++++++++++++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/piglit/piglit/piglit.sh
meta/recipes-graphics/piglit/piglit/piglit.sh new file +20 -0
new file mode 100644
index 0000000..3308b70
@@ -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 "$@"
meta/recipes-graphics/piglit/piglit_git.bb +19 -1
index 82adcde..916154a 100644
@@ -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,15 @@ 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"
+
+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/
+}
+
Signature · 1 line
2.9.3
#2 lore raw

PATCH 2/2 core-tools-testapps: Re-add piglit

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.

---
 meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +2 -0
index 3170978..69cfd57 100644
@@ -17,6 +17,8 @@ KEXECTOOLS_nios2 ?= ""
 
 X11GLTOOLS = "\
     mesa-demos \
+    piglit \
+    piglit-generated-tests-compressed \
     "
 
 3GTOOLS = "\
Signature · 1 line
2.9.3
#3 lore raw
In reply to Jussi Kukkonen
Quoted 9 lines · Jussi Kukkonen

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.

Q: Do I need to declare a runtime dependency that typically comes from busybox (tar)?

Yes, because some people try to eliminate busybox from their image.

Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada, K2K 2W5
#4 lore raw
Quoted 5 lines · On Tue, 18 Oct 2016 11:13:11 Randy MacLeod wrote:
Quoted 4 lines · Jussi Kukkonen

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.

Quoted 7 lines
Quoted 5 lines

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

Q: Do I need to declare a runtime dependency that typically comes from busybox (tar)?

Yes, because some people try to eliminate busybox from their image.

How would one express such a dependency though, given that it could come from tar or busybox? "Virtual" runtime dependencies aren't allowed except through our somewhat awkward VIRTUAL-RUNTIME convention, but that probably isn't warranted here.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw
Quoted 12 lines · Paul Eggleton
Quoted 4 lines
Quoted 2 lines

Q: Do I need to declare a runtime dependency that typically comes from busybox (tar)?

Yes, because some people try to eliminate busybox from their image.

How would one express such a dependency though, given that it could come from
tar or busybox? "Virtual" runtime dependencies aren't allowed except through
our somewhat awkward VIRTUAL-RUNTIME convention, but that probably isn't warranted here.

busybox could RRPOVIDE tar?

Ross

#6 lore raw
Quoted 7 lines · Ross
Quoted 3 lines · On 18 October 2016 at 22:21, Paul Eggleton <[email protected]…
Quoted 2 lines

Q: Do I need to declare a runtime dependency that typically comes from busybox (tar)?

Quoted 8 lines
Quoted 1 line

Yes, because some people try to eliminate busybox from their image.

How would one express such a dependency though, given that it could come from tar or busybox? "Virtual" runtime dependencies aren't allowed except through our somewhat awkward VIRTUAL-RUNTIME convention, but that probably isn't warranted here.

busybox could RRPOVIDE tar?

If we go down that road, we'd end up with a busybox that RPROVIDES a hundred and one utilities. I doubt anyone will be happy with that...

Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: [email protected]
Website: www.topicproducts.com

Please consider the environment before printing this e-mail

#7 lore raw
Quoted 6 lines · Mike Looijmans

busybox could RRPOVIDE tar?

Quoted 1 line

If we go down that road, we'd end up with a busybox that RPROVIDES a hundred and one utilities. I doubt anyone will be happy with that...

Well, only for the utilities which are separately packaged and generally swapped around. ie it wouldn't need to RPROVIDE "ls".

Ross

#8 lore raw
In reply to Mike Looijmans
Quoted 22 lines · Mike Looijmans
Quoted 21 lines · Ross

On 18 October 2016 at 22:21, Paul Eggleton <[email protected] el.com
<mailto:[email protected]>> wrote:

    > > Q: Do I need to declare a runtime dependency that typically comes
    > > from busybox (tar)?
    >
    > Yes, because some people try to eliminate busybox from their image.

    How would one express such a dependency though, given that it could come from
    tar or busybox? "Virtual" runtime dependencies aren't allowed except through
    our somewhat awkward VIRTUAL-RUNTIME convention, but that probably isn't
    warranted here.

Quoted 4 lines
Quoted 1 line

busybox could RRPOVIDE tar?

If we go down that road, we'd end up with a busybox that RPROVIDES a hundred
and one utilities. I doubt anyone will be happy with that...

We've come across this problem before. It is something which is probably worth looking at to see what options we have but it is probably a tangential issue to the patch at hand.

Cheers,

Richard