smoke - better use of tree-kill

This commit is contained in:
Benjamin Pasero 2022-04-05 19:08:33 +02:00
parent 8212626e5f
commit 16b97e6846
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65
2 changed files with 8 additions and 3 deletions

View file

@ -203,7 +203,12 @@ export class Code {
// no need to await since we're polling for the process to die anyways
treekill(pid, err => {
this.logger.log('Failed to kill Electron process tree:', err?.message);
try {
process.kill(pid, 0); // throws an exception if the process doesn't exist anymore
this.logger.log('Failed to kill Electron process tree:', err?.message);
} catch (error) {
// Expected when process is gone
}
});
}

View file

@ -21,7 +21,7 @@ example: yarn smoketest --build /Applications/Visual\ Studio\ Code\ -\ Insiders.
# Build (Web - read instructions below)
yarn smoketest --build <path to server web build (ends in -web)> --web --browser [chromium|webkit]
# Remote (Electron - Must be run on distro)
# Remote (Electron)
yarn smoketest --build <path to latest version> --remote
```
@ -57,7 +57,7 @@ xattr -d com.apple.quarantine <path to server with web folder zip>
- `-f PATTERN` (alias `-g PATTERN`) filters the tests to be run. You can also use pretty much any mocha argument;
- `--headless` will run playwright in headless mode when `--web` is used.
**Note**: you can enable verbose logging of playwright library by setting a `DEBUG` environment variable before running the tests (https://playwright.dev/docs/debug#verbose-api-logs)
**Note**: you can enable verbose logging of playwright library by setting a `DEBUG` environment variable before running the tests (https://playwright.dev/docs/debug#verbose-api-logs), for example to `pw:browser`.
### Develop