# Packaging smoke test: the /usr/bin symlink resolves back to the installed
# tree (so rootpath() picks the right IGTOP), the built-in layer library
# parses and lints, and "clean" - which runs the same dependency check as
# "build" - succeeds with the sbin directories stripped from PATH. Depends on
# the main package alone, deliberately: it should stand up without
# rpi-image-gen-doc. Needs no network. Skippable because dependencies_check
# demands binfmt_misc on a non-arm host, without which nothing runs at all.
Tests: smoke
Depends: rpi-image-gen
Restrictions: allow-stderr, skippable

# The compiled helpers, checked for the capability each is vendored for
# rather than for its mere presence. rpi-image-gen is here for lib/tools.sh,
# which the PATH check reads; the dependency runs that way round, so the host
# package does not pull it in. Needs no network and no privileges.
Tests: host-tools
Depends: rpi-image-gen, rpi-image-gen-host
Restrictions: allow-stderr

# Upstream's own test suite, run against the installed tree. The runners
# derive their project root from their own location, which is why test/ is
# installed under /usr/share/rpi-image-gen rather than /usr/share/doc.
Tests: upstream-testsuite
Depends: @
Restrictions: allow-stderr

# End-to-end: build examples/reproducible_debfs twice and require the two
# filesystem tarballs to be byte-identical. Needs network access to
# snapshot.debian.org and the privileges mmdebstrap wants for its mount
# namespace; exits 77 if it cannot get either.
Tests: reproducible-build
Depends: @
Restrictions: allow-stderr, isolation-machine, needs-internet, skippable

# End-to-end for the erofs root the vendored mkfs.erofs exists for: build
# config/trixie-minbase-ab.yaml, which forces a 16K page size and defaults
# its root filesystem to erofs, and read the block size back out of the
# image. The image is arm64, hence qemu-user-binfmt and arch-test for a
# non-arm64 host; same privilege and network needs as above.
Tests: image-build-ab
Depends: @, qemu-user-binfmt, arch-test
Restrictions: allow-stderr, isolation-machine, needs-internet, skippable
