Persistence-setup is not currently integrated with run_test_suite.

To run it, follow these instructions, making sure that you are in the config/chroot_local-includes/usr/src/persistence-setup directory.

Pre-requisites

Install test dependencies

cd "$(git rev-parse --show-toplevel)/config/chroot_local-includes/usr/src/persistence-setup" && \
cat "$(git rev-parse --show-toplevel)/config/chroot_local-packageslists/tails-persistence-setup.list" \
   | grep -E -v '^#' \
   | xargs sudo apt --yes install && \
sudo apt install \
   libmodule-build-perl \
   libdist-zilla-plugin-test-notabs-perl \
   libdist-zilla-plugin-test-perl-critic-perl \
   libdist-zilla-app-command-authordebs-perl \
   libtest-most-perl \
   libtest-spec-perl \
   libtest-bdd-cucumber-perl \
   liblwp-online-perl \
   libdata-dumper-concise-perl \
   libtest-fatal-perl \
   libsys-statistics-linux-perl \
   seahorse-daemon
&& dzil authordebs --install

Run the test suite

cd "$(git rev-parse --show-toplevel)/config/chroot_local-includes/usr/src/persistence-setup" && \
PERL5LIB="$(git rev-parse --show-toplevel)/config/chroot_local-includes/usr/src/perl5lib/lib" \
   TAILS_GIT_CHECKOUT="$(git rev-parse --show-toplevel)" \
   LC_ALL=C.UTF-8 \
   fakeroot dzil test --all

It has happened in the past that this code base required adjustments to work with newer versions of the libraries it depends on, so if tests fail on testing/sid, retry on Debian stable before going amok.

To run only BDD tests (ala Cucumber) defined under config/chroot_local-includes/usr/src/persistence-setup/features, use pherkin. For example:

cd "$(git rev-parse --show-toplevel)/config/chroot_local-includes/usr/src/persistence-setup" && \
PERL5LIB="$(git rev-parse --show-toplevel)/config/chroot_local-includes/usr/src/perl5lib/lib" \
   TAILS_GIT_CHECKOUT="$(git rev-parse --show-toplevel)" \
   LC_ALL=C.UTF-8 \
   pherkin