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

Unified Diff: third_party/WebKit/Source/devtools/scripts/npm_test.js

Issue 2669593003: DevTools: npm test - add --target=SUB_DIRECTORY_NAME (Closed)
Patch Set: fix readme Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/readme.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/npm_test.js
diff --git a/third_party/WebKit/Source/devtools/scripts/npm_test.js b/third_party/WebKit/Source/devtools/scripts/npm_test.js
index b07453b52e039069b2843cdbb1270fc9a2c5c8ea..096d65fc4da1bfc7f32e5195c4d2f056fbde8987 100644
--- a/third_party/WebKit/Source/devtools/scripts/npm_test.js
+++ b/third_party/WebKit/Source/devtools/scripts/npm_test.js
@@ -14,7 +14,8 @@ var Flags = {
DEBUG_DEVTOOLS_SHORTHAND: '-d',
FETCH_CONTENT_SHELL: '--fetch-content-shell',
COMPAT_PROTOCOL: '--compat-protocol', // backwards compatibility testing
- CHROMIUM_PATH: '--chromium-path' // useful for bisecting
+ CHROMIUM_PATH: '--chromium-path', // useful for bisecting
+ TARGET: '--target', // build sub-directory (e.g. Release, Default)
};
var COMPAT_URL_MAPPING = {
@@ -26,6 +27,7 @@ var IS_DEBUG_ENABLED =
var COMPAT_PROTOCOL = utils.parseArgs(process.argv)[Flags.COMPAT_PROTOCOL];
var CUSTOM_CHROMIUM_PATH = utils.parseArgs(process.argv)[Flags.CHROMIUM_PATH];
var IS_FETCH_CONTENT_SHELL = utils.includes(process.argv, Flags.FETCH_CONTENT_SHELL);
+var TARGET = utils.parseArgs(process.argv)[Flags.TARGET] || 'Release';
var CONTENT_SHELL_ZIP = 'content-shell.zip';
var MAX_CONTENT_SHELLS = 10;
@@ -33,7 +35,7 @@ var PLATFORM = getPlatform();
var PYTHON = process.platform === 'win32' ? 'python.bat' : 'python';
var CHROMIUM_SRC_PATH = CUSTOM_CHROMIUM_PATH || path.resolve(__dirname, '..', '..', '..', '..', '..');
-var RELEASE_PATH = path.resolve(CHROMIUM_SRC_PATH, 'out', 'Release');
+var RELEASE_PATH = path.resolve(CHROMIUM_SRC_PATH, 'out', TARGET);
var BLINK_TEST_PATH = path.resolve(CHROMIUM_SRC_PATH, 'blink', 'tools', 'run_layout_tests.py');
var DEVTOOLS_PATH = path.resolve(CHROMIUM_SRC_PATH, 'third_party', 'WebKit', 'Source', 'devtools');
var CACHE_PATH = path.resolve(DEVTOOLS_PATH, '.test_cache');
@@ -72,7 +74,7 @@ function runCompatibilityTests() {
utils.removeRecursive(path.resolve(RELEASE_PATH, 'resources', 'inspector'));
compileFrontend();
var outPath = path.resolve(CACHE_PATH, folder, 'out');
- var contentShellDirPath = path.resolve(outPath, 'Release');
+ var contentShellDirPath = path.resolve(outPath, TARGET);
var hasCachedContentShell = utils.isFile(getContentShellBinaryPath(contentShellDirPath));
if (hasCachedContentShell) {
console.log(`Using cached content shell at: ${outPath}`);
@@ -99,7 +101,7 @@ function compileFrontend() {
}
function onUploadedCommitPosition(commitPosition) {
- var contentShellDirPath = path.resolve(CACHE_PATH, commitPosition, 'out', 'Release');
+ var contentShellDirPath = path.resolve(CACHE_PATH, commitPosition, 'out', TARGET);
var contentShellResourcesPath = path.resolve(contentShellDirPath, 'resources');
var contentShellPath = path.resolve(CACHE_PATH, commitPosition, 'out');
@@ -239,7 +241,7 @@ function extractContentShell(contentShellZipPath) {
shell(`${PYTHON} ${unzipScriptPath} ${src} ${dest}`);
fs.unlinkSync(src);
var originalDirPath = path.resolve(dest, 'content-shell');
- var newDirPath = path.resolve(dest, 'Release');
+ var newDirPath = path.resolve(dest, TARGET);
fs.renameSync(originalDirPath, newDirPath);
fs.chmodSync(getContentShellBinaryPath(newDirPath), '755');
if (process.platform === 'darwin') {
@@ -267,6 +269,8 @@ function runTests(buildDirectoryPath, useDebugDevtools) {
'--no-pixel-tests',
'--build-directory',
buildDirectoryPath,
+ '--target',
+ TARGET,
]);
if (useDebugDevtools)
testArgs.push('--additional-driver-flag=--debug-devtools');
« no previous file with comments | « third_party/WebKit/Source/devtools/readme.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698