Merge ~sylvain-pineau/checkbox-core-snap:add-glmark2-es2 into checkbox-core-snap:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 695577e3643edcb25a3ac7e636f6a29d0627d7fb
Merged at revision: 9d5210019e965687de8e4bf83288149e0207d2bb
Proposed branch: ~sylvain-pineau/checkbox-core-snap:add-glmark2-es2
Merge into: checkbox-core-snap:master
Diff against target: 27 lines (+16/-0)
1 file modified
snap/snapcraft.yaml (+16/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Vic Liu Needs Information
Jonathan Cave (community) Approve
Review via email: mp+395922@code.launchpad.net

Description of the change

Add the glmark2-es2 part to get the master version rather than the repo version (too old) on arm projects

To post a comment you must log in.
Revision history for this message
Jonathan Cave (jocave) wrote :

Is there any value in restricting this to arm builds of the snap only or is adding it everywhere no real isse?

review: Needs Information
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

https://packages.ubuntu.com/focal/glmark2-es2 exists for all arch, so if I was using stage packages I would not bother restricting to arm only. I think it's ok to also build for all.

Revision history for this message
Jonathan Cave (jocave) wrote :

Ok, +1

review: Approve
Revision history for this message
Vic Liu (zongminl) wrote :

Tried to build this and run with checkbox-newparis, some errors could be found when starting glmark2-es2 in shell.

This is what I did:
1. git clone -b add-glmark2-es2 https://git.launchpad.net/~sylvain-pineau/checkbox-core-snap
2. cd checkbox-core-snap/
3. snapcraft --destructive-mode
(I'll need to install 'meson' before I started to build the snap or the build will be terminated, maybe we can add "- meson" in "build-packages" to avoid this?)
4. Copy the checkbox20_1.19.dev_amd64.snap to kmc-uno-420 hardware and side-load it with `sudo snap install checkbox20_1.19.dev_amd64.snap --devmode`
5. Connect interfaces `sudo snap connect checkbox-newparis:checkbox-runtime checkbox20:checkbox-runtime`
6. sudo checkbox-newparis.shell
7. root@CommanderBX-KSA4009233:/home/admin# glmark2-es2
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/textures'
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/textures'
Error: main: Could not initialize canvas

review: Needs Fixing
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Added meson as a build dep, weird that the plugin does not do it automatically...
Added a layout to map the /usr/share/glmark2 correctly

review: Needs Resubmitting
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

one last thing, better test it on classic first. On core devices you might need to declare the https://snapcraft.io/docs/opengl-interface

Revision history for this message
Vic Liu (zongminl) wrote :

Here's the result of running it with checkbox-snappy and checkbox-snappy-classic respectively, glmark2-es2 works fine with checkbox-snappy-classic but still won't start with checkbox-snappy, is this expected?

- System info
I tested it on my laptop which runs ubuntu desktop 20.04
$ uname -a
Linux zongminl-Inspiron-7370 5.4.0-60-generic #67-Ubuntu SMP Tue Jan 5 18:31:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

- Run with checkbox-snappy-classic:
zongminl@zongminl-Inspiron-7370:~$ sudo checkbox-snappy-classic.shell
checkbox-snappy-classic runtime shell, type 'exit' to quit the session
root@zongminl-Inspiron-7370:/home/zongminl# glmark2-es2
=======================================================
    glmark2 2020.04
=======================================================
    OpenGL Information
    GL_VENDOR: Intel
    GL_RENDERER: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
    GL_VERSION: OpenGL ES 3.2 Mesa 20.2.6
=======================================================
[build] use-vbo=false: FPS: 3516 FrameTime: 0.284 ms
[build] use-vbo=true: FPS: 3624 FrameTime: 0.276 ms
=======================================================
                                  glmark2 Score: 3570
=======================================================

- Run with checkbox-snappy:
zongminl@zongminl-Inspiron-7370:~$ sudo checkbox-snappy.shell
checkbox-snappy runtime shell, type 'exit' to quit the session
root@zongminl-Inspiron-7370:/home/zongminl# glmark2-es2
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/textures'
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/models'
Error: Failed to open models directory '/usr/share/glmark2/textures'
Error: eglGetDisplay() failed with error: 0x3000
Error: eglGetDisplay() failed with error: 0x3000
Error: main: Could not initialize canvas

review: Needs Information
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

On classic I had to start it using:

glmark2-es2 --data-path "$CHECKBOX_RUNTIME"/usr/share/glmark2/

But on core even with invocation like this I still get the same error. Even tried adding plugs like
opengl, desktop, x11, desktop-legacy. Nothing works.

But I'm less worried by having to run glmark2 on core as it sounds really specific. The only reason we would need such a test would be kisk app, and for that wayland or mir plugs are probably enough.

I'd then land this part and create a test just for classic test plans.

Vic, does that sounds reasonable?

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I've dropped the layout section as the job command will call glmark2-es2 as follow:

$ glmark2-es2 --data-path "$CHECKBOX_RUNTIME"/usr/share/glmark2/

review: Approve
Revision history for this message
Vic Liu (zongminl) wrote :

Sorry for my late reply.
Yes it sounds reasonable to have this test on classic image at the moment and we can implement something more for core image if we need it in the future

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
2index 7903d7f..3f5ccf2 100644
3--- a/snap/snapcraft.yaml
4+++ b/snap/snapcraft.yaml
5@@ -371,6 +371,22 @@ parts:
6 source: git://git.launchpad.net/plainbox-provider-certification-server
7 after: [plainbox-provider-certification-client]
8 ################################################################################
9+ glmark2:
10+ source: https://github.com/glmark2/glmark2.git
11+ plugin: meson
12+ build-packages:
13+ - libpng-dev
14+ - libjpeg-dev
15+ - libdrm-dev
16+ - libgbm-dev
17+ - libudev-dev
18+ - libx11-dev
19+ - meson
20+ meson-parameters:
21+ #- -Dflavors=drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2
22+ - -Dflavors=x11-glesv2
23+ - --prefix=/usr
24+################################################################################
25 rpi-ppa:
26 plugin: nil
27 override-pull: |

Subscribers

People subscribed via source and target branches