]> git.saurik.com Git - apple/security.git/blob - SecurityTests/testmain.c
Security-57337.50.23.tar.gz
[apple/security.git] / SecurityTests / testmain.c
1 /*
2 * testmain.c
3 * Security
4 *
5 * Created by Fabrice Gautier on 8/26/10.
6 * Copyright (c) 2010,2012-2014 Apple Inc. All Rights Reserved.
7 *
8 */
9 #include <stdio.h>
10 #include <stdlib.h>
11
12 #include <unistd.h>
13
14 #include <test/testenv.h>
15
16 #include "testlist.h"
17 #include <test/testlist_begin.h>
18 #include "testlist.h"
19 #include <test/testlist_end.h>
20
21 #include <dispatch/dispatch.h>
22 #include <CoreFoundation/CFRunLoop.h>
23
24 int main(int argc, char *argv[])
25 {
26 //printf("Build date : %s %s\n", __DATE__, __TIME__);
27 //printf("WARNING: If running those tests on a device with a passcode, DONT FORGET TO UNLOCK!!!\n");
28
29 #if 0 && NO_SERVER
30 SOSCloudKeychainServerInit();
31 #endif
32
33 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
34 int result = tests_begin(argc, argv);
35
36 fflush(stderr);
37 fflush(stdout);
38
39 sleep(1);
40
41 exit(result);
42 });
43
44 CFRunLoopRun();
45
46 return 0;
47 }