Allan Odgaard
2ad42430c4
Make client API for oak::server_t thread safe
2013-08-05 11:17:04 +02:00
Allan Odgaard
c3a6294806
Use std::function instead of templated argument
2013-08-03 17:22:01 +02:00
Allan Odgaard
84ef9bb768
Use std::transform instead of custom code
2013-08-03 13:22:03 +02:00
Allan Odgaard
84dc2dd871
Allow a target to use both new and old test system
...
Presently the new test system cannot be used for (interactive) GUI tests, so we keep the old one until we have that feature in the new.
2013-08-01 19:01:24 +02:00
Jacob Bandes-Storch
17e822896e
Add Quick Look generator
...
Closes #1062
2013-07-30 23:11:49 +02:00
Allan Odgaard
ce395fa46a
Make bundle item queries thread safe
...
Note though that mutating the bundle item index is not allowed if other threads are querying it.
2013-07-26 13:53:57 +02:00
Allan Odgaard
d5d01542f7
Support copying test::jail_t
2013-07-25 13:54:25 +02:00
Allan Odgaard
eb1acfe70f
Remove box_layout.h header (unused)
2013-06-28 08:42:06 +02:00
Allan Odgaard
58cfa20a1b
Add operator<< for std::map
...
This is to allow chaining inserts and to avoid temporary variables when inserting maps returned from functions.
2013-05-12 11:09:16 +07:00
Allan Odgaard
b489687403
Disable AuthorizationExecuteWithPrivileges deprecation warning
...
The “proper” replacement for this API is to use the ServiceManagement framework’s SMJobBless() to bless our helper tool. In two of the three use-cases our helper tool is however regular shell commands, so it seems redundant to wrap these shell tools as helper tools we can install as launchd jobs.
2013-05-06 14:51:31 +07:00
Allan Odgaard
398e55cdbe
Add helper functions to get OS version
...
We need this in a few places and while calling Gestalt() isn’t that much code, that function is deprecated in 10.8 and the alternative is a lot more code, so we don’t want to repeat that once we update the code.
2013-03-17 15:44:06 +01:00
Allan Odgaard
d18b30f280
Remove oak::lock_t and oak::mutex_t
2013-03-13 12:37:21 +01:00
Allan Odgaard
24f6f3bd2c
Use posix_spawn instead of fork/exec
...
Using Apple’s POSIX_SPAWN_CLOEXEC_DEFAULT appears to be the only safe way to spawn a child process in a multi-threaded program.
2013-03-10 16:07:11 +01:00
Allan Odgaard
13edc6d131
Use O_CLOEXEC when opening files
...
This avoids leaking file descriptors into child processes, which would otherwise happen if another thread forks while the file descriptor is open.
2013-03-10 16:07:10 +01:00
Allan Odgaard
090a6ac698
Increase queue size for test (web) server
...
With concurrent tests and sequential handling of requests, the queue size is likely to grow to “number of concurrent tests”.
2013-03-10 16:07:10 +01:00
Allan Odgaard
eb893105e4
Disallow copying test::jail_t
...
Since we delete the jailed directory in the destructor we can’t support a deep copy of this type. Since we don’t need it, and it’s just a type used in tests, I opted for simply disabling this (to get a compiler error, should it be attempted) rather than introduce the necessary code to allow shallow copies.
2013-02-25 15:26:41 +01:00
Allan Odgaard
4712515e8b
Allow passing a window to OakSetupApplicationWithView
...
Should rename the function to reflect this new flexibility.
2013-02-04 19:38:31 +01:00
Allan Odgaard
5e291d8a22
Improve QuickLook support
...
Preview can now be initiated with multiple items and while the preview panel is showing, one can use arrow up/down to switch to other items (in the file browser).
2013-01-12 13:09:19 +01:00
Allan Odgaard
701c9a0541
Use ‘std’ namespace prefix when calling search()
...
This is to avoid a clash with other things named ‘search’.
2012-12-28 02:47:19 +01:00
Allan Odgaard
efb6eb6b08
Update required headers
2012-09-30 15:25:44 +02:00
Allan Odgaard
452c0b3889
Make cocoa.h usable with ARC
...
This means removing a few autoreleases so it’ll leak when building without ARC, but as this is just for a short-lived test, it shouldn’t matter.
2012-09-24 20:58:42 +02:00
Allan Odgaard
a94e89d7be
Remove code for beginof/endof
2012-09-20 12:22:21 +02:00
Allan Odgaard
0f3861fec7
Retire custom begin/endof functions
...
We can now use std::begin/end although for containers we explicitly call the member functions.
2012-09-20 12:22:21 +02:00
Allan Odgaard
45c87c47f8
Rename CocoaSTL.h → objc_ptr.h
2012-09-20 12:22:20 +02:00
Allan Odgaard
4273bf968b
Get rid of C++ style NSIndexSet iteration
2012-09-20 12:22:19 +02:00
Allan Odgaard
2739b4cf20
Remove unused stuff from CocoaSTL.h
2012-09-20 12:22:19 +02:00
Allan Odgaard
45fdb380ea
Extend std::string’s lifetime for safe use of c_str
...
20% of reported crashes are in launch_tbz which indirectly call oak::c_array. My hunch is that the c_str buffer is overwritten because the std::string which returned it has been disposed, this makes strdup() do a bad allocation / memory read.
This would likely be a race condition (wrt. the c_str buffer) and coincidentally the oak::c_array is called in a thread (when it crashes).
2012-09-16 11:41:24 +02:00
Allan Odgaard
b2acb02a7f
Use std::function with cf::callback_t
2012-09-09 16:22:19 +02:00
Allan Odgaard
9940e4b321
Remove unused boost headers
2012-08-30 23:05:08 +02:00
Allan Odgaard
0e96a04d76
Remove compatibility checks
...
Since we now require 10.7 we don’t need all of this. Keeping it around is just noise that can lead to confusion about code paths.
2012-08-29 16:02:29 +02:00
Allan Odgaard
cbe91ff831
Assume compiler support for explicit keyword
...
Since we require a fairly recent clang for other features, there is no reason to test for this one.
2012-08-29 14:27:35 +02:00
Jacob Bandes-Storch
c976bce24d
Use 64-bit: use std::thread to avoid void* cast
2012-08-28 21:32:46 +02:00
Jacob Bandes-Storch
c5520a6919
Use libc++: replace typeof with decltype
2012-08-28 13:30:21 +02:00
Jacob Bandes-Storch
fd419fd0b1
Use libc++: replace __gnu_cxx with std
2012-08-28 13:30:20 +02:00
Jacob Bandes-Storch
e3aa997b06
Use libc++: replace std::tr1 with std
2012-08-28 13:30:20 +02:00
Allan Odgaard
485bdde0f7
Move oak::c_array to oak/datatypes.h
...
This simple wrapper is useful in a few places so we shouldn’t need to depend on the OakSystem framework in order to use it.
2012-08-11 19:21:28 +02:00
Allan Odgaard
9894969e67
Initial commit
2012-08-09 16:25:56 +02:00