ci: fix WOA failing tests (10-x-y) (#25107)

* tests: fix early-in-memory-session-create crash test on WOA

ci: cleanup user app data directories on WOA
(cherry picked from commit 43106d28d8)

* Renable crash tests on WOA
This commit is contained in:
John Kleinschmidt
2020-08-25 01:25:57 -04:00
committed by GitHub
parent da5eac885d
commit e492b88f9f
3 changed files with 9 additions and 5 deletions

View File

@@ -87,7 +87,11 @@ steps:
- powershell: |
Get-Process | Where Name Like "electron*" | Stop-Process
Get-Process | Where Name Like "MicrosoftEdge*" | Stop-Process
Get-Process | Where Name Like "msedge*" | Stop-Process
displayName: 'Kill processes left running from last test run'
condition: always()
- powershell: |
Remove-Item -path $env:APPDATA/Electron* -Recurse
displayName: 'Delete user app data directories'
condition: always()

View File

@@ -2,7 +2,6 @@ import { expect } from 'chai';
import * as cp from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import { ifdescribe } from './spec-helpers';
const fixturePath = path.resolve(__dirname, 'fixtures', 'crash-cases');
@@ -31,8 +30,7 @@ const runFixtureAndEnsureCleanExit = (args: string[]) => {
});
};
// TODO re-enable this test for WOA
ifdescribe(process.platform !== 'win32' || process.arch !== 'arm64')('crash cases', () => {
describe('crash cases', () => {
afterEach(() => {
for (const child of children) {
child.kill();

View File

@@ -2,5 +2,7 @@ const { app, session } = require('electron');
app.on('ready', () => {
session.fromPartition('in-memory');
process.exit(0);
setImmediate(() => {
process.exit(0);
});
});