mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: skip all subtests if external dependencies are missing during init
Some tests (e.g. crypto) do a common initialization required for all subtests. The patch adds a check for missing external dependencies during this initialization. If any prerequisites are missing, all subtests are skipped. The check is run on the first call of test_reset_state_ function, so no changes for the tests are needed.
This commit is contained in:
parent
5b37fb1e25
commit
f325466728
1 changed files with 10 additions and 0 deletions
|
@ -902,10 +902,20 @@ test_emacs () {
|
|||
}
|
||||
|
||||
test_reset_state_ () {
|
||||
test -z "$test_init_done_" && test_init_
|
||||
|
||||
test_subtest_known_broken_=
|
||||
test_subtest_missing_external_prereqs_=
|
||||
}
|
||||
|
||||
# called once before the first subtest
|
||||
test_init_ () {
|
||||
test_init_done_=t
|
||||
|
||||
# skip all tests if there were external prerequisites missing during init
|
||||
test_check_missing_external_prereqs_ "all tests in $this_test" && test_done
|
||||
}
|
||||
|
||||
|
||||
find_notmuch_path ()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue