OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ASSERT_TRUE(done.get()); | 117 ASSERT_TRUE(done.get()); |
118 | 118 |
119 base::FilePath test_executable = Paths::Executable(); | 119 base::FilePath test_executable = Paths::Executable(); |
120 | 120 |
121 std::wstring child_test_executable = | 121 std::wstring child_test_executable = |
122 test_executable.DirName() | 122 test_executable.DirName() |
123 .Append(directory_modification) | 123 .Append(directory_modification) |
124 .Append(test_executable.BaseName().RemoveFinalExtension().value() + | 124 .Append(test_executable.BaseName().RemoveFinalExtension().value() + |
125 L"_process_info_test_child.exe") | 125 L"_process_info_test_child.exe") |
126 .value(); | 126 .value(); |
127 // TODO(scottmg): Command line escaping utility. | 127 |
128 ChildLauncher child( | 128 std::wstring args; |
129 child_test_executable, | 129 AppendCommandLineArgument(started_uuid.ToString16(), &args); |
130 started_uuid.ToString16() + L" " + done_uuid.ToString16()); | 130 args += L" "; |
| 131 AppendCommandLineArgument(done_uuid.ToString16(), &args); |
| 132 |
| 133 ChildLauncher child(child_test_executable, args); |
131 child.Start(); | 134 child.Start(); |
132 | 135 |
133 // Wait until the test has completed initialization. | 136 // Wait until the test has completed initialization. |
134 ASSERT_EQ(WaitForSingleObject(started.get(), INFINITE), WAIT_OBJECT_0); | 137 ASSERT_EQ(WaitForSingleObject(started.get(), INFINITE), WAIT_OBJECT_0); |
135 | 138 |
136 ASSERT_TRUE(process_info.Initialize(child.process_handle())); | 139 ASSERT_TRUE(process_info.Initialize(child.process_handle())); |
137 | 140 |
138 // Tell the test it's OK to shut down now that we've read our data. | 141 // Tell the test it's OK to shut down now that we've read our data. |
139 SetEvent(done.get()); | 142 SetEvent(done.get()); |
140 | 143 |
(...skipping 27 matching lines...) Expand all Loading... |
168 TestOtherProcess(FILE_PATH_LITERAL("..\\..\\out\\Debug")); | 171 TestOtherProcess(FILE_PATH_LITERAL("..\\..\\out\\Debug")); |
169 #else | 172 #else |
170 TestOtherProcess(FILE_PATH_LITERAL("..\\..\\out\\Release")); | 173 TestOtherProcess(FILE_PATH_LITERAL("..\\..\\out\\Release")); |
171 #endif | 174 #endif |
172 } | 175 } |
173 #endif // ARCH_CPU_64_BITS | 176 #endif // ARCH_CPU_64_BITS |
174 | 177 |
175 } // namespace | 178 } // namespace |
176 } // namespace test | 179 } // namespace test |
177 } // namespace crashpad | 180 } // namespace crashpad |
OLD | NEW |