Merge with -r 22620:23107.
[blender.git] / source / creator / creator.c
index 41b27b1..5ada950 100644 (file)
 #include "binreloc.h"
 #endif
 
+#ifdef WITH_UNIT_TEST
+#include "tests/test.h"
+#endif
+
 // from buildinfo.c
 #ifdef BUILD_DATE
 extern char * build_date;
@@ -332,6 +336,12 @@ int main(int argc, char **argv)
                        exit(0);
                }
 
+#ifdef WITH_UNIT_TEST
+               if (!strcmp(argv[a], "--test")) {
+                       exit(run_tests());
+               }
+#endif
+
                /* end argument processing after -- */
                if (!strcmp( argv[a], "--")){
                        a = argc;