From 1a7621e6e3ca4ad7c132d1b9d4f7d5dc67fc1a32 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 12:46:01 -0500 Subject: test/librechroot: test CHROOTEXTRAPKG --- test/librechroot-test.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh index ae5dd4b..f8dd2ba 100644 --- a/test/librechroot-test.sh +++ b/test/librechroot-test.sh @@ -52,6 +52,20 @@ it_disables_networking_when_requested() { ! testsudo librechroot -l "$roundup_test_name" -N run curl https://repo.parabolagnulinux.org/ >/dev/null } +it_handles_CHROOTEXTRAPKG_correctly() { + requuire network sudo || return 0 + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + + ! testsudo librechroot -l "$roundup_test_name" run lsof + echo "CHROOTEXTRAPKG=(lsof)" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf + testsudo librechroot -l "$roundup_test_name" install-name lsof + testsudo librechroot -l "$roundup_test_name" clean-pkgs + testsudo librechroot -l "$roundup_test_name" run lsof + echo "CHROOTEXTRAPKG=()" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf + testsudo librechroot -l "$roundup_test_name" clean-pkgs + ! testsudo librechroot -l "$roundup_test_name" run lsof +} + it_displays_help_as_normal_user() { rm -rf "$XDG_CONFIG_HOME" LC_ALL=C librechroot help >$tmpdir/stdout 2>$tmpdir/stderr -- cgit v1.2.2