clear logs
Summary: - clear logs using executeShell - remove unused spawnShell Reviewed By: jknoxville Differential Revision: D17343235 fbshipit-source-id: 4353b2ebc00e35b31e815e405534a78b65a3eabb
This commit is contained in:
committed by
Facebook Github Bot
parent
62a73fff14
commit
b3de081f68
@@ -77,13 +77,9 @@ export default class AndroidDevice extends BaseDevice {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnShell(): DeviceShell | null | undefined {
|
|
||||||
return child_process.spawn('adb', ['-s', this.serial, 'shell', '-t', '-t']);
|
|
||||||
}
|
|
||||||
|
|
||||||
clearLogs(): Promise<void> {
|
clearLogs(): Promise<void> {
|
||||||
this.logEntries = [];
|
this.logEntries = [];
|
||||||
return spawn('adb', ['logcat', '-c']).then(_ => undefined);
|
return this.executeShell(['logcat', '-c']);
|
||||||
}
|
}
|
||||||
|
|
||||||
archive(): ArchivedDevice {
|
archive(): ArchivedDevice {
|
||||||
@@ -126,7 +122,7 @@ export default class AndroidDevice extends BaseDevice {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async executeShell(command: string): Promise<void> {
|
private async executeShell(command: string | string[]): Promise<void> {
|
||||||
const output = await this.adb
|
const output = await this.adb
|
||||||
.shell(this.serial, command)
|
.shell(this.serial, command)
|
||||||
.then(adb.util.readAll)
|
.then(adb.util.readAll)
|
||||||
|
|||||||
@@ -135,10 +135,6 @@ export default class BaseDevice {
|
|||||||
this.logListeners.delete(id);
|
this.logListeners.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnShell(): DeviceShell | null | undefined {
|
|
||||||
throw new Error('unimplemented');
|
|
||||||
}
|
|
||||||
|
|
||||||
navigateToLocation(location: string) {
|
navigateToLocation(location: string) {
|
||||||
throw new Error('unimplemented');
|
throw new Error('unimplemented');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user