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