test: drop now-empty remote runner (#35343)

* test: drop the now-empty remote runner from CI

* move fixtures to spec-main

* remove remote runner

* fix stuff

* remove global-paths hack

* move ts-smoke to spec/

* fix test after merge

* rename spec-main to spec

* no need to ignore spec/node_modules twice

* simplify spec-runner a little

* no need to hash pj/yl twice

* undo lint change to verify-mksnapshot.py

* excessive ..

* update electron_woa_testing.yml

* don't search for test-results-remote.xml

it is never produced now
This commit is contained in:
Jeremy Rose 2022-08-16 12:23:13 -07:00 committed by GitHub
parent e87c4015fe
commit db7c92fd57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
327 changed files with 950 additions and 1707 deletions

View file

@ -13,7 +13,7 @@ const fail = '✗'.red;
const args = require('minimist')(process.argv, {
string: ['runners', 'target'],
boolean: ['buildNativeTests', 'runTestFilesSeparately'],
boolean: ['buildNativeTests'],
unknown: arg => unknownFlags.push(arg)
});
@ -34,7 +34,6 @@ const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx';
const runners = new Map([
['main', { description: 'Main process specs', run: runMainProcessElectronTests }],
['remote', { description: 'Remote based specs', run: runRemoteBasedElectronTests }],
['native', { description: 'Native specs', run: runNativeElectronTests }]
]);
@ -60,7 +59,6 @@ async function main () {
if (somethingChanged) {
await installSpecModules(path.resolve(__dirname, '..', 'spec'));
await installSpecModules(path.resolve(__dirname, '..', 'spec-main'));
await getSpecHash().then(saveSpecHash);
}
@ -154,26 +152,6 @@ const specFilter = (file) => {
}
};
async function runTests (specDir, testName) {
if (args.runTestFilesSeparately) {
const getFiles = require('../spec/static/get-files');
const testFiles = await getFiles(path.resolve(__dirname, `../${specDir}`), { filter: specFilter });
const baseElectronDir = path.resolve(__dirname, '..');
unknownArgs.splice(unknownArgs.length, 0, '--files', '');
testFiles.sort().forEach(async (file) => {
unknownArgs.splice((unknownArgs.length - 1), 1, path.relative(baseElectronDir, file));
console.log(`Running tests for ${unknownArgs[unknownArgs.length - 1]}`);
await runTestUsingElectron(specDir, testName);
});
} else {
await runTestUsingElectron(specDir, testName);
}
}
async function runRemoteBasedElectronTests () {
await runTests('spec', 'remote');
}
async function runNativeElectronTests () {
let testTargets = require('./native-test-targets.json');
const outDir = `out/${utils.getOutDir()}`;
@ -226,7 +204,7 @@ async function runNativeElectronTests () {
}
async function runMainProcessElectronTests () {
await runTests('spec-main', 'main');
await runTestUsingElectron('spec', 'main');
}
async function installSpecModules (dir) {
@ -261,9 +239,7 @@ function getSpecHash () {
(async () => {
const hasher = crypto.createHash('SHA256');
hasher.update(fs.readFileSync(path.resolve(__dirname, '../spec/package.json')));
hasher.update(fs.readFileSync(path.resolve(__dirname, '../spec-main/package.json')));
hasher.update(fs.readFileSync(path.resolve(__dirname, '../spec/yarn.lock')));
hasher.update(fs.readFileSync(path.resolve(__dirname, '../spec-main/yarn.lock')));
hasher.update(fs.readFileSync(path.resolve(__dirname, '../script/spec-runner.js')));
return hasher.digest('hex');
})(),