Unit Test Framework API
[asterisk/asterisk.git] / main / asterisk.c
index f8f3fa4..5509788 100644 (file)
@@ -140,6 +140,7 @@ int daemon(int, int);  /* defined in libresolv of all places */
 #include "asterisk/buildinfo.h"
 #include "asterisk/xmldoc.h"
 #include "asterisk/poll-compat.h"
+#include "asterisk/test.h"
 
 #include "../defaults.h"
 
@@ -3547,6 +3548,13 @@ int main(int argc, char *argv[])
                exit(1);
        }
 
+#ifdef TEST_FRAMEWORK
+       if (ast_test_init()) {
+               printf("%s", term_quit());
+               exit(1);
+       }
+#endif
+
        ast_makesocket();
        sigemptyset(&sigs);
        sigaddset(&sigs, SIGHUP);