
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
= ocrunner
ocrunner is a little Ruby wrapper for running OCUnit tests in Xcode from the command line. Its main purpose is to parse the huge output from xcodebuild and display a pretty summary to the user.
To use this, you'll need to be set up with a test target. See http://developer.apple.com/mac/articles/tools/unittestingwithxcode3.html
== Usage
cd path/to/xcode/project/directory ocrunner
To run tests as files are changed (autotest-style), use:
ocrunner --auto
== Signals
Control-c: kill ocrunner Control-: toggle verbosity and rerun tests. This is nice for when the pretty filtered output doesn't show quite enough information to you.
== Pretty debug logging with OCLog() and OCOLog()
This is a little crazy, but ocrunner has support for displaying debug log messaged from your Objective-C code through the use of two custom logging macros. The messages are colored purple in order to make them easier to see in the verbose output. To use this feature, add the following macro to a header or prefix file in your Xcode project:
#define OCLog(format, ...) NSLog([NSString stringWithFormat: @"%s:%d:%s:\033[35m%@\033[0m", PRETTY_FUNCTION, LINE, FILE, format], ## VA_ARGS) #define OCOLog(object) OCLog(@"%@", object)
OCLog is a drop in replacement for NSLog(). OCOLog is for logging a single values without having to specify the format string.
ocrunner will display the latest version of this macro when run with --oclog-help.
== I don't like your defaults
Don't worry, you can specify the target/configuration/sdk options passed to xcodebuild. You can see all the available options by running ocrunner -h:
--sdk, -s <s>: SDK to build against (default: iphonesimulator3.1.3)
--target, -t <s>: Target to build (default: Test)
--config, -c <s>: Configuration to use (default: Debug)
--parallel, -p: Use multiple processors to build multiple targets (parallelizeTargets) (default: true)
--auto, -a: Watch filesystem for changes and run tests when they occur
--growl, -g: Report results using Growl
--debug-command, -d: Print xcodebuild command and exit
--verbose, -v: Display all xcodebuild output after summary
--loud-compilation, -l: Always show verbose output when a compilation or linking error occurs (default: true) --oclog, -r: Display OCLog log messages (default: true) --oclog-help, -o: Print OCLog code example and exit --version, -e: Print version and exit --help, -h: Show this message
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2010 Jim Benton. See LICENSE for details.
FAQs
Unknown package
We found that ocrunner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.