Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: testing/iossim/iossim.mm

Issue 398133002: In iossim, use the user's home directory if no override is given. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync'd Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 #include <asl.h> 6 #include <asl.h>
7 #include <libgen.h> 7 #include <libgen.h>
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 10
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 else { 902 else {
903 LogError(@"Invalid device name: %@. Must begin with 'iPhone' or 'iPad'", 903 LogError(@"Invalid device name: %@. Must begin with 'iPhone' or 'iPad'",
904 deviceName); 904 deviceName);
905 exit(kExitInvalidArguments); 905 exit(kExitInvalidArguments);
906 } 906 }
907 #endif // !defined(IOSSIM_USE_XCODE_6) 907 #endif // !defined(IOSSIM_USE_XCODE_6)
908 908
909 // Set up the user home directory for the simulator only if a non-default 909 // Set up the user home directory for the simulator only if a non-default
910 // value was specified. 910 // value was specified.
911 if (simHomePath) { 911 if (simHomePath) {
912 if (!InitializeSimulatorUserHome(simHomePath)) { 912 if (!InitializeSimulatorUserHome(simHomePath)) {
smut 2014/07/16 18:47:37 Can you move this check below so it tries to initi
lliabraa 2014/07/16 18:49:53 It's not necessary to initialize the directory whe
smut 2014/07/16 18:52:20 Ok. I wasn't sure what this did (e.g. maybe it che
913 LogError(@"Unable to initialize home directory for simulator: %@", 913 LogError(@"Unable to initialize home directory for simulator: %@",
914 simHomePath); 914 simHomePath);
915 exit(kExitInitializationFailure); 915 exit(kExitInitializationFailure);
916 } 916 }
917 } else {
918 simHomePath = NSHomeDirectory();
917 } 919 }
918 920
919 // Create the config and simulator session. 921 // Create the config and simulator session.
920 DTiPhoneSimulatorSessionConfig* config = BuildSessionConfig(appSpec, 922 DTiPhoneSimulatorSessionConfig* config = BuildSessionConfig(appSpec,
921 systemRoot, 923 systemRoot,
922 stdioPath, 924 stdioPath,
923 stdioPath, 925 stdioPath,
924 appArgs, 926 appArgs,
925 appEnv, 927 appEnv,
926 deviceFamily, 928 deviceFamily,
(...skipping 19 matching lines...) Expand all
946 [error localizedDescription], 948 [error localizedDescription],
947 [error domain], static_cast<long int>([error code])); 949 [error domain], static_cast<long int>([error code]));
948 } 950 }
949 951
950 // Note that this code is only executed if the simulator fails to start 952 // Note that this code is only executed if the simulator fails to start
951 // because once the main run loop is started, only the delegate calling 953 // because once the main run loop is started, only the delegate calling
952 // exit() will end the program. 954 // exit() will end the program.
953 [pool drain]; 955 [pool drain];
954 return kExitFailure; 956 return kExitFailure;
955 } 957 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698