In the current Mac OS X / Cocoa project I’m working on, we need to be able to run an installer from code. Naturally, I’ve written tests for this, which work fine on my own machine. However, when I checked in the code, the test would literally hang at the point where it should be executing the “installer” command.
The continuous integration system we’re using is cruisecontrol.rb which is started at boot time by launchd under a non-root user running on a Mac Mini. Consequently, when the test is run that fires up the installer command, it’s doing so as a non-root user.
This no workie.
I’m sure there’s some sort of interesting and obscure way to circumvent this, but the general size of things is that you can’t run the installer command unless you’re using sudo or you’re root. Since running sudo in the above context is kinda obtuse, and since we’re not going to run cc.rb as root, it looks like these particular tests are now out of the automated test suite and into the manual test suite. At least there’s an explanation now!