Fix running layout tests
In crrev.com/c/2520088 the blink web_tests infrastructure started using
a module that is in Python 3, but not 2. This started crashing our `npm
run test`, since we force the python version. Based on the comments on
the original CL, we should call the Python script directly and then
everything works as expected.
R=aerotwist@chromium.org
Change-Id: Iafe123e6adf792da940d3ca605e2eddd49ee5eba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563820
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
diff --git a/scripts/npm_test.js b/scripts/npm_test.js
index c2e6e44..882ddda 100644
--- a/scripts/npm_test.js
+++ b/scripts/npm_test.js
@@ -20,8 +20,6 @@
const CUSTOM_CHROMIUM_PATH = utils.parseArgs(process.argv)[Flags.CHROMIUM_PATH];
const TARGET = utils.parseArgs(process.argv)[Flags.TARGET] || 'Release';
-const PYTHON = process.platform === 'win32' ? 'python.bat' : 'python';
-
const CURRENT_PATH = process.env.PWD || process.cwd(); // Using env.PWD to account for symlinks.
const isThirdParty = CURRENT_PATH.includes('third_party');
const CHROMIUM_SRC_PATH = CUSTOM_CHROMIUM_PATH || getChromiumSrcPath(isThirdParty);
@@ -110,9 +108,9 @@
}
console.log('=============================================\n');
}
- const args = [BLINK_TEST_PATH].concat(testArgs).concat(getTestFlags());
+ const args = [...testArgs, ...getTestFlags()];
console.log(`Running web tests with args: ${args.join(' ')}`);
- childProcess.spawn(PYTHON, args, {stdio: 'inherit'});
+ childProcess.spawn(BLINK_TEST_PATH, args, {stdio: 'inherit'});
}
function getTestFlags() {