1 #include <os/log.h>
2 #include <stdio.h>
3 
4 #include "../common/darwin_log_common.h"
5 
main(int argc,char ** argv)6 int main(int argc, char** argv)
7 {
8     os_log_t logger = os_log_create("org.llvm.lldb.test", "basic-test");
9     if (!logger)
10         return 1;
11 
12     // Note we cannot use the os_log() line as the breakpoint because, as of
13     // the initial writing of this test, we get multiple breakpoints for that
14     // line, which confuses the pexpect test logic.
15     printf("About to log\n"); // break here
16     os_log(logger, "Hello, world");
17 
18     // Sleep, as the darwin log reporting doesn't always happen until a bit
19     // later.  We need the message to come out before the process terminates.
20     sleep(FINAL_WAIT_SECONDS);
21 
22     return 0;
23 }
24