File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (36 lines) | stat: -rw-r--r-- 1,290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
summary: Test interfaces exposing nvidia libraries on classic userspace

details: Test interfaces exposing nvidia libraries on classic userspace

systems: [ubuntu-24*]

environment:
  NVIDIA_TEST_SNAP: test-nvidia-interfaces

prepare: |
  snap install snapcraft --channel="${SNAPCRAFT_SNAP_CHANNEL}" --classic
  (cd "$TESTSLIB"/snaps/"$NVIDIA_TEST_SNAP" && snapcraft)

restore: |
  snap remove --purge snapcraft || true
  rm -f "$TESTSLIB"/snaps/"$NVIDIA_TEST_SNAP"/"$NVIDIA_TEST_SNAP"_*.snap

execute: |
  snap install --dangerous "$TESTSLIB"/snaps/"$NVIDIA_TEST_SNAP"/"$NVIDIA_TEST_SNAP"_*.snap

  SNAP_LDCONF_P=/etc/ld.so.conf.d/snap.system.conf
  for iface in cuda egl gbm opengl opengles; do
      snap connect system:"$iface"-driver-libs "$NVIDIA_TEST_SNAP":"$iface"-dl
      MATCH "$iface" < "$SNAP_LDCONF_P"
  done

  EGL_VENDOR_P=/etc/glvnd/egl_vendor.d/10_snap_"$NVIDIA_TEST_SNAP"_egl-dl_nvidia.json
  MATCH libEGL_nvidia.so.0 < "$EGL_VENDOR_P"
  ARCH_TRIPLET=$(gcc -dumpmachine)
  GBM_LIB_P=$(realpath /usr/lib/"$ARCH_TRIPLET"/gbm/nvidia-drm_gbm.so)
  [[ "$GBM_LIB_P" = /snap/"$NVIDIA_TEST_SNAP"/x1/usr/lib/"$ARCH_TRIPLET"/libnvidia-allocator.* ]]

  snap remove --purge "$NVIDIA_TEST_SNAP"
  not test -f "$SNAP_LDCONF_P"
  not test -f "$EGL_VENDOR_P"
  not test -h "$GBM_LIB_P"