]> 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>
Fri, 26 Mar 2021 13:57:58 +0000 (14:57 +0100)
bacula/src/lib/unittests.c
bacula/src/lib/unittests.h

index 6530c5960fa9548ae48205e8260ce47f927e8764..c6351c909a08bcc37964e8f79ec23f7636d634bc 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 7c1ff479705e482989b0ec25f75dfce7b3ce4521..5b2f3a9dff1b1fbd896a58fe21d07b5161a014fd 100644 (file)
@@ -61,6 +61,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