This commit is contained in:
Connor Peet
2021-04-09 17:46:21 -07:00
parent 6229e7a57f
commit 6b666279b8
18 changed files with 515 additions and 61 deletions

View File

@@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { bufferToStream, VSBuffer } from 'vs/base/common/buffer';
import { CancellationToken } from 'vs/base/common/cancellation';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { isDefined } from 'vs/base/common/types';
@@ -71,7 +72,8 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh
* @inheritdoc
*/
public $publishExtensionProvidedResults(results: ISerializedTestResults, persist: boolean): void {
this.resultService.push(new HydratedTestResult(results, persist));
// todo
this.resultService.push(new HydratedTestResult(results, () => Promise.resolve(bufferToStream(VSBuffer.alloc(0))), persist));
}
/**
@@ -84,6 +86,17 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh
}
}
/**
* @inheritdoc
*/
public $appendOutputToRun(runId: string, output: VSBuffer): void {
const r = this.resultService.getResult(runId);
if (r && r instanceof LiveTestResult) {
r.output.append(output);
}
}
/**
* @inheritdoc
*/