Using Apple Script to tell the simulator to quit doesn't work if the simulator is crashing or doesn't respond. As a result, sim_launcher will launch another iPhone Simulator that never stop launching.
As a consequence, my whole CI environment is stuck and the test never finishes.
I've quick fixed the problem by issuing a killall -9 "iPhone Simulator"
instead of using apple script to quit the simulator when the restart=true parameter is passed. It's a very brutal approach but at least I avoid the whole CI getting stuck. Perhaps there's a better way?