File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ beforeEach(async function beforeEach() {
53
53
after ( async function ( ) {
54
54
console . log ( ' ✨ Tests Complete ✨ ' ) ;
55
55
const isAndroid = detox . device . getPlatform ( ) === 'android' ;
56
+ const deviceId = detox . device . id ;
56
57
57
58
// emits 'cleanup' across socket, which goes native, terminates Detox test Looper
58
59
// This returns control to the java code in our instrumented test, and then Instrumentation lifecycle finishes cleanly
@@ -69,12 +70,12 @@ after(async function () {
69
70
const localDestDir = './android/app/build/output/coverage/' ;
70
71
71
72
try {
72
- execSync ( `adb shell "run-as ${ pkg } cat ${ emuOrig } > ${ emuDest } "` ) ;
73
+ execSync ( `adb -s ${ deviceId } shell "run-as ${ pkg } cat ${ emuOrig } > ${ emuDest } "` ) ;
73
74
execSync ( `mkdir -p ${ localDestDir } ` ) ;
74
- execSync ( `adb pull ${ emuDest } ${ localDestDir } /emulator_coverage.ec` ) ;
75
+ execSync ( `adb -s ${ deviceId } pull ${ emuDest } ${ localDestDir } /emulator_coverage.ec` ) ;
75
76
console . log ( `Coverage data downloaded to: ${ localDestDir } /emulator_coverage.ec` ) ;
76
77
} catch ( e ) {
77
- console . log ( 'Unable to download coverage data from device: ' , e ) ;
78
+ console . log ( 'Unable to download coverage data from device: ' , JSON . stringify ( e ) ) ;
78
79
}
79
80
}
80
81
You can’t perform that action at this time.
0 commit comments