Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New logger subsystem (Bunyan) #835

Merged
merged 44 commits into from
Jul 25, 2018
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f4aa98e
code: extracted detox-common pkg, switched to bunyan logger
noomorph Jul 4, 2018
a10cba1
code: reduced log levels for wss
noomorph Jul 17, 2018
6803b7f
fix: instrumentationProcess.on bug
noomorph Jul 17, 2018
e101e9e
feat: detox.init() terminates tests if it fails
noomorph Jul 17, 2018
d5555b6
code: switched link to the fork of bunyan-debug-stream
noomorph Jul 17, 2018
bd3ca0c
code: removed remnants of previous experiments
noomorph Jul 17, 2018
d6feea8
fix: wss loglevel resolves to trace
noomorph Jul 17, 2018
126287c
fix: a more polite handling of detox.init() error
noomorph Jul 17, 2018
f995be5
test: removed real logging in the middle of test
noomorph Jul 17, 2018
2d67a57
build: fixing the CI build
noomorph Jul 17, 2018
6f0235a
feat: reduced extra verbosity of spawn logs
noomorph Jul 17, 2018
d594c00
fix: returned 100% coverage and tweaked spawn logs
noomorph Jul 18, 2018
5956648
fix: removed useless errors from the logs
noomorph Jul 18, 2018
46d0097
test: fixed test expectations
noomorph Jul 18, 2018
d9cc156
feat: added plain file logging too
noomorph Jul 18, 2018
2c80ffe
fix: bugfixes and unit test fixes
noomorph Jul 18, 2018
7c00301
feat: appending process.pid to log filename for multiple test workers…
noomorph Jul 19, 2018
b83e569
fix: expectation in index.test.js
noomorph Jul 19, 2018
c3af893
fix: updated artifact directory snapshots for iOS
noomorph Jul 23, 2018
abf36b7
code: more logging inside Artifact.js and SimulatorLogRecording.js also
noomorph Jul 23, 2018
113be22
build: temporary elevated log verbosity level
noomorph Jul 23, 2018
af185cc
code: added beforeEach and afterEach trace logging
noomorph Jul 23, 2018
9fccc1a
code: moved most of calls into .emit method of artifacts manager
noomorph Jul 23, 2018
2e5d458
code: minor fixes according to the review
noomorph Jul 23, 2018
8d107b6
test: updated snapshots
noomorph Jul 23, 2018
6cdc26e
wip: merging detox-server and detox-common into detox package
noomorph Jul 23, 2018
cf0d4c1
feat: printing environment variables before jest test command
noomorph Jul 24, 2018
aaa70dc
feat: added timeout for unlock screen command
noomorph Jul 24, 2018
0e6ba3e
build: force exit test suites that failed on beforeAll
noomorph Jul 24, 2018
c450657
test: updated unit tests
noomorph Jul 24, 2018
bc7203c
hack: trying to debug CI error
noomorph Jul 24, 2018
0b7142e
hack: more precise log
noomorph Jul 24, 2018
d308f5c
hack: ignoring exception
noomorph Jul 24, 2018
0abb2bf
fix: logging exec success even if there is no output
noomorph Jul 24, 2018
20819bf
code: switched AAPT to use utils/exec.js as well
noomorph Jul 24, 2018
e8c474c
code: switched back to the official bunyan-debug-stream package
noomorph Jul 24, 2018
c8ad84d
hack: using retries on CI
noomorph Jul 24, 2018
d9ddfe2
code: minor cleanups
noomorph Jul 24, 2018
c15572c
fix: made no-color argument really work
noomorph Jul 24, 2018
455e0ec
feat: adding deprecated warning for the old log level names
noomorph Jul 25, 2018
ffd9b7d
code: relaxed retries on adb.unlockScreen and added a TODO
noomorph Jul 25, 2018
7521d61
Merge remote-tracking branch 'origin/master' into noomorph/powerlogs
noomorph Jul 25, 2018
cd886ae
revert: too verbose logs for CI
noomorph Jul 25, 2018
1d6173f
docs: updated detox server mentions
noomorph Jul 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: instrumentationProcess.on bug
  • Loading branch information
noomorph committed Jul 17, 2018
commit 6803b7f945732c7343278f094a5cfb04268301de
11 changes: 6 additions & 5 deletions detox/src/devices/AndroidDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const ADBScreencapPlugin = require('../artifacts/screenshot/ADBScreencapPlugin')
const ADBScreenrecorderPlugin = require('../artifacts/video/ADBScreenrecorderPlugin');
const AndroidDevicePathBuilder = require('../artifacts/utils/AndroidDevicePathBuilder');
const sleep = require('../utils/sleep');
const interruptProcess = require('../utils/interruptProcess');
const { spawnAndLog } = require('../utils/exec');

const EspressoDetox = 'com.wix.detox.espresso.EspressoDetox';
Expand Down Expand Up @@ -98,7 +99,7 @@ class AndroidDriver extends DeviceDriverBase {
[`-s`, `${deviceId}`, `shell`, `am`, `instrument`, `-w`, `-r`, `${args.join(' ')}`, `-e`, `debug`, `false`, testRunner],
{ detached: false });

this.instrumentationProcess.on('close', () => this.terminateInstrumentation());
this.instrumentationProcess.childProcess.on('close', () => this.terminateInstrumentation());

return this._queryPID(deviceId, bundleId);
}
Expand Down Expand Up @@ -136,19 +137,19 @@ class AndroidDriver extends DeviceDriverBase {
}

async terminate(deviceId, bundleId) {
this.terminateInstrumentation();
await this.terminateInstrumentation();
await this.adb.terminate(deviceId, bundleId);
}

terminateInstrumentation() {
async terminateInstrumentation() {
if (this.instrumentationProcess) {
this.instrumentationProcess.kill();
await interruptProcess(this.instrumentationProcess);
this.instrumentationProcess = null;
}
}

async cleanup(deviceId, bundleId) {
this.terminateInstrumentation();
await this.terminateInstrumentation();
}

defaultLaunchArgsPrefix() {
Expand Down