OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 var childProcess = require('child_process'); | 5 var childProcess = require('child_process'); |
6 var fs = require('fs'); | 6 var fs = require('fs'); |
7 var path = require('path'); | 7 var path = require('path'); |
8 var shell = require('child_process').execSync; | 8 var shell = require('child_process').execSync; |
9 | 9 |
10 var utils = require('./utils'); | 10 var utils = require('./utils'); |
(...skipping 127 matching lines...) Loading... |
138 utils.removeRecursive(copiedFrontendPath); | 138 utils.removeRecursive(copiedFrontendPath); |
139 utils.removeRecursive(debugFrontendPath); | 139 utils.removeRecursive(debugFrontendPath); |
140 utils.copyRecursive(SOURCE_PATH, devtoolsResourcesPath); | 140 utils.copyRecursive(SOURCE_PATH, devtoolsResourcesPath); |
141 fs.renameSync(copiedFrontendPath, debugFrontendPath); | 141 fs.renameSync(copiedFrontendPath, debugFrontendPath); |
142 utils.copy(inspectorBackendCommandsPath, debugFrontendPath); | 142 utils.copy(inspectorBackendCommandsPath, debugFrontendPath); |
143 utils.copy(supportedCSSPropertiesPath, debugFrontendPath); | 143 utils.copy(supportedCSSPropertiesPath, debugFrontendPath); |
144 } | 144 } |
145 | 145 |
146 function getPlatform() { | 146 function getPlatform() { |
147 if (process.platform === 'linux') { | 147 if (process.platform === 'linux') { |
148 if (process.arch === 'x64') | 148 return 'Linux_x64'; |
149 return 'Linux_x64'; | |
150 throw new Error('Pre-compiled content shells are only available for x64 on L
inux'); | |
151 } | 149 } |
152 if (process.platform === 'win32') { | 150 if (process.platform === 'win32') { |
153 if (process.arch === 'x64') | 151 return 'Win_x64'; |
154 return 'Win_x64'; | |
155 return 'Win'; | |
156 } | 152 } |
157 if (process.platform === 'darwin') | 153 if (process.platform === 'darwin') |
158 return 'Mac'; | 154 return 'Mac'; |
159 | 155 |
160 throw new Error(`Unrecognized platform detected: ${process.platform}`); | 156 throw new Error(`Unrecognized platform detected: ${process.platform}`); |
161 } | 157 } |
162 | 158 |
163 function findMostRecentChromiumCommit() { | 159 function findMostRecentChromiumCommit() { |
164 var commitMessage = shell(`git log --max-count=1 --grep="Cr-Commit-Position"`)
.toString().trim(); | 160 var commitMessage = shell(`git log --max-count=1 --grep="Cr-Commit-Position"`)
.toString().trim(); |
165 var commitPosition = commitMessage.match(/Cr-Commit-Position: refs\/heads\/mas
ter@\{#([0-9]+)\}/)[1]; | 161 var commitPosition = commitMessage.match(/Cr-Commit-Position: refs\/heads\/mas
ter@\{#([0-9]+)\}/)[1]; |
(...skipping 142 matching lines...) Loading... |
308 | 304 |
309 function getInspectorTests() { | 305 function getInspectorTests() { |
310 var specificTests = process.argv.filter(arg => utils.includes(arg, 'inspector'
)); | 306 var specificTests = process.argv.filter(arg => utils.includes(arg, 'inspector'
)); |
311 if (specificTests.length) | 307 if (specificTests.length) |
312 return specificTests; | 308 return specificTests; |
313 return [ | 309 return [ |
314 'inspector*', | 310 'inspector*', |
315 'http/tests/inspector*', | 311 'http/tests/inspector*', |
316 ]; | 312 ]; |
317 } | 313 } |
OLD | NEW |