diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 6a479fa9..efdc5ead 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -90,6 +90,12 @@ jobs: git checkout -- packages/saslprep/src/code-points-data.ts shell: bash + - name: Configure Electron sandbox + if: ${{ runner.os == 'Linux' }} + run: | + sudo chown root:root node_modules/electron/dist/chrome-sandbox + sudo chmod 4755 node_modules/electron/dist/chrome-sandbox + - name: Info run: | LERNA_VERSION=$(npm ls lerna --json | jq -r .dependencies.lerna.version) diff --git a/packages/devtools-proxy-support/package.json b/packages/devtools-proxy-support/package.json index bb5280fc..d1a23d36 100644 --- a/packages/devtools-proxy-support/package.json +++ b/packages/devtools-proxy-support/package.json @@ -58,7 +58,7 @@ "check": "npm run typecheck && npm run lint && npm run depcheck", "check-ci": "npm run check", "test": "mocha", - "test-cov": "nyc -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test", + "test-cov": "nyc --use-spawn-wrap -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test", "test-watch": "npm run test -- --watch", "test-ci": "npm run test-cov", "reformat": "npm run prettier -- --write ." diff --git a/packages/devtools-proxy-support/src/proxy-options.spec.ts b/packages/devtools-proxy-support/src/proxy-options.spec.ts index 98e8d05f..c5edebe7 100644 --- a/packages/devtools-proxy-support/src/proxy-options.spec.ts +++ b/packages/devtools-proxy-support/src/proxy-options.spec.ts @@ -172,14 +172,6 @@ describe('proxy options handling', function () { let setup: HTTPServerProxyTestSetup; before(async function () { - // TODO: COMPASS-9232 reenable the test on Linux and, ideally, on Windows, after - // investigating the failures. - if ( - (process.platform === 'win32' || process.platform === 'linux') && - process.env.CI - ) { - return this.skip(); - } setup = new HTTPServerProxyTestSetup(); await setup.listen(); @@ -190,9 +182,13 @@ describe('proxy options handling', function () { await once(server, 'listening'); const connEvent = once(server, 'connection'); childProcess = spawn( - 'npx', + // Resolving the xvfb-maybe script and running it with the current + // Node binary rather than going through `npx`, because on Windows + // spawning `npx` (really `npx.cmd`) fails with ENOENT unless a shell + // is used. + process.execPath, [ - 'xvfb-maybe', + require.resolve('xvfb-maybe/src/xvfb-maybe.js'), // eslint-disable-next-line @typescript-eslint/no-var-requires require('electron') as unknown as string, path.resolve(__dirname, '..', 'test', 'electron-test-server.js'),