     }
 
     func run(control: FBSimulatorControl) throws {
-        testRun = try FBXCTestRun.withTestRunFile(atPath: context.testRun.path).build()
+        let testRun = try FBXCTestRun.withTestRunFile(atPath: context.testRun.path).build()
 
         try context.outputManager.reset(
             targets: testRun.targets.map({ $0.name }),

        let crashes: [FBDiagnostic]
    }

    private let context: Context
    private let reporterRegistry: ReporterRegistry
    private var simulators: [FBSimulator] = []
    private var testRun: FBXCTestRun!

    init(context: Context) {
        self.context = context

            try simulators.install(applications: target.applications)
            try simulators.startTest(testLaunchConfigurartion: testLaunchConfigurartion, target: target, reporterRegistry: reporterRegistry)

            bundleIDS += target.applications.flatMap({ $0.bundleID })

            for simulator in simulators {
                let testManagerResults = simulator.resourceSink.testManagers.flatMap { $0.waitUntilTestingHasFinished(withTimeout: context.timeout) }
                if testManagerResults.reduce(true, { $0 && $1.didEndSuccessfully }) {
