Azure DevOps pipeline - generate unique test result names (#105148)

* Set suite name based on environment variable
This commit is contained in:
Ladislau Szomoru
2020-08-21 15:05:15 +02:00
committed by GitHub
parent 25ad7485b3
commit 06730e3e29
7 changed files with 78 additions and 15 deletions

View File

@@ -6,14 +6,24 @@
const path = require('path');
const testRunner = require('vscode/lib/testrunner');
const suite = 'Integration Single Folder Tests';
const options: any = {
ui: 'tdd',
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
timeout: 60000
};
// These integration tests is being run in multiple environments (electron, web, remote)
// so we need to set the suite name based on the environment as the suite name is used
// for the test results file name
let suite = '';
if (process.env.VSCODE_BROWSER) {
suite = `${process.env.VSCODE_BROWSER} Browser Integration Single Folder Tests`;
} else if (process.env.REMOTE_VSCODE) {
suite = 'Remote Integration Single Folder Tests';
} else {
suite = 'Integration Single Folder Tests';
}
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
options.reporter = 'mocha-multi-reporters';
options.reporterOptions = {