Skip to content

Commit

Permalink
test: use lxd for python symlink tests
Browse files Browse the repository at this point in the history
Signed-off-by: Callahan Kovacs <[email protected]>
  • Loading branch information
mr-cal committed Feb 20, 2025
1 parent 0993fda commit 7dd9b89
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/spread/plugins/craft-parts/python-symlinks/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,24 @@ environment:
SNAP/strict_gnome_extension: strict-gnome-extension

restore: |
unset SNAPCRAFT_BUILD_ENVIRONMENT
cd "${SNAP}"
snapcraft clean
rm -f ./*.snap
rm -rf ./squashfs-root
execute: |
unset SNAPCRAFT_BUILD_ENVIRONMENT
cd "${SNAP}"
if [ -f expected-symlink ]; then
snapcraft prime
ls -l prime/bin
[ -x prime/bin/hello ]
[ "$(readlink prime/bin/python3)" == "$(cat expected-symlink)" ]
snapcraft pack
unsquashfs ${SNAP}_1.0_amd64.snap
ls -l squashfs-root/bin
[ -x squashfs-root/bin/hello ]
[ "$(readlink squashfs-root/bin/python3)" == "$(cat expected-symlink)" ]
else
snapcraft prime 2>&1 | MATCH "No suitable Python interpreter found, giving up."
fi
snapcraft prime -v 2>&1 | MATCH "No suitable Python interpreter found, giving up."
fi

0 comments on commit 7dd9b89

Please sign in to comment.