don't open the sim in foreground when running in spec mode

This commit is contained in:
Laurent Sansonetti
2012-05-30 13:51:03 +02:00
parent 588e3caf28
commit 94234cddd5
2 changed files with 4 additions and 1 deletions

View File

@@ -955,7 +955,9 @@ main(int argc, char **argv)
}
// Open simulator to the foreground.
system("/usr/bin/open -a \"iPhone Simulator\"");
if (getenv("NO_FOREGROUND_SIM") == NULL) {
system("/usr/bin/open -a \"iPhone Simulator\"");
}
[[NSRunLoop mainRunLoop] run];
return 0;

View File

@@ -71,6 +71,7 @@ task :simulator => ['build:simulator'] do
# Launch the simulator.
xcode = App.config.xcode_dir
env = xcode.match(/^\/Applications/) ? "DYLD_FRAMEWORK_PATH=\"#{xcode}/../Frameworks\":\"#{xcode}/../OtherFrameworks\"" : ''
env << ' NO_FOREGROUND_SIM=1' if App.config.spec_mode
sim = File.join(App.config.bindir, 'sim')
debug = (ENV['debug'] || (App.config.spec_mode ? '0' : '2')).to_i
debug = 2 if debug < 0 or debug > 2