]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add functions to unittests library
authorEric Bollengier <eric@baculasystems.com>
Thu, 18 Mar 2021 09:27:27 +0000 (10:27 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:01 +0000 (09:03 +0100)
bacula/src/lib/unittests.c
bacula/src/lib/unittests.h

index 2e6dc6cc7643a3c2826746b60282bcc39445ad04..001e06fc463956d349a1328cc6b7267322fc0785 100644 (file)
@@ -77,6 +77,18 @@ void configure_test(uint64_t options)
    }
 }
 
+/* Get the total number of tests */
+int unittest_get_nb_tests()
+{
+   return nb;
+}
+
+/* Get the total number of tests in error */
+int unittest_get_nb_errors()
+{
+   return err;
+}
+
 /*
  * Test success if value is not zero.
  */
index d29c4d177357345cddf10846aa7b65f9ebb81d72..0ae91dbdc587cc7bc917307ab01ae97e81cb634f 100644 (file)
@@ -63,6 +63,8 @@ int report();
 void terminate(int sig);
 void prolog(const char *name, bool lmgr=false, bool motd=true);
 void epilog();
+int unittest_get_nb_tests();
+int unittest_get_nb_errors();
 
 /* The class based approach for C++ geeks */
 class Unittests