mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
test: mark some tests as broken when run as root.
File permission errors e.g., are hard to trigger as root.
This commit is contained in:
parent
1d5d0ae686
commit
f4dc32e71b
3 changed files with 8 additions and 0 deletions
|
@ -384,6 +384,7 @@ EOF
|
|||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest "Xapian exception: read only files"
|
||||
test_subtest_broken_for_root
|
||||
chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.*
|
||||
output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' )
|
||||
chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.*
|
||||
|
|
|
@ -320,6 +320,7 @@ test_begin_subtest "Tag name beginning with -"
|
|||
test_expect_code 1 'notmuch tag +- One'
|
||||
|
||||
test_begin_subtest "Xapian exception: read only files"
|
||||
test_subtest_broken_for_root
|
||||
chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.*
|
||||
output=$(notmuch tag +something '*' 2>&1 | sed 's/: .*$//' )
|
||||
chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.*
|
||||
|
|
|
@ -740,6 +740,12 @@ test_subtest_known_broken () {
|
|||
test_subtest_known_broken_=t
|
||||
}
|
||||
|
||||
test_subtest_broken_for_root () {
|
||||
if [ "$EUID" = "0" ]; then
|
||||
test_subtest_known_broken_=t
|
||||
fi
|
||||
}
|
||||
|
||||
test_expect_success () {
|
||||
exec 1>&6 2>&7 # Restore stdout and stderr
|
||||
if [ -z "$inside_subtest" ]; then
|
||||
|
|
Loading…
Reference in a new issue