]> rtime.felk.cvut.cz Git - notmuch.git/blobdiff - test/test-lib.sh
test: skip all subtests if external dependencies are missing during init
[notmuch.git] / test / test-lib.sh
index df867a5ff78b0a57b083c936e619ad3ae3797e06..99b9e8b8096386484f27fea028e75292a93e1007 100644 (file)
@@ -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 ()
 {