[xharness] Don't use variables (isSimulator) before they've been initialized. (#397)

Fixes an issue where we would try to fetch crash logs from device when
running in the simulator.
This commit is contained in:
Rolf Bjarne Kvinge 2016-07-14 21:31:55 +02:00 коммит произвёл Sebastien Pouliot
Родитель 14c060897e
Коммит ea9cfe533c
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -311,13 +311,15 @@ namespace xharness
public async Task<int> RunAsync ()
{
CrashReportSnapshot crash_reports = new CrashReportSnapshot () { Device = !isSimulator, Harness = Harness, Log = main_log, Logs = Logs, LogDirectory = LogDirectory };
CrashReportSnapshot crash_reports;
LogStream device_system_log = null;
LogStream listener_log = null;
Log run_log = main_log;
Initialize ();
crash_reports = new CrashReportSnapshot () { Device = !isSimulator, Harness = Harness, Log = main_log, Logs = Logs, LogDirectory = LogDirectory };
var args = new StringBuilder ();
if (!string.IsNullOrEmpty (Harness.XcodeRoot))
args.Append (" --sdkroot ").Append (Harness.XcodeRoot);