Skip to content

Commit

Permalink
tests: add basic test to check snap-gpio-helper binary is installed
Browse files Browse the repository at this point in the history
Signed-off-by: Zeyad Gouda <[email protected]>
  • Loading branch information
ZeyadYasser committed Feb 5, 2025
1 parent 2566835 commit a74f848
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/main/snap-gpio-helper/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
summary: Check that snap-helper-helper exists

details: |
The test verifies that snap-gpio-helper exists
systems: [ubuntu-*]

execute: |
libexecdir=$(os.paths libexec-dir)
if tests.info is-snapd-from-archive; then
libexecdir="/snap/snapd/current$libexecdir"
fi
if [ ! -f "$libexecdir/snapd/snap-gpio-helper" ]; then
exit 1
fi
# Verify that snap-gpio-helper skeleton re-execs
echo "Ensure snap-gpio-helper re-execs"
set +e
SNAPD_DEBUG=1 "$libexecdir/snapd/snap-gpio-helper" 2>&1 | MATCH "DEBUG: restarting into"
set -e
# TODO: add more checks

0 comments on commit a74f848

Please sign in to comment.