File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
2
// Licensed under the MIT License.
3
3
4
- // tslint:disable:no-string-literal
5
4
import { workspace } from 'vscode' ;
6
5
import { PythonSettings } from '../client/common/configSettings' ;
7
6
8
- export const IS_APPVEYOR = process . env [ 'APPVEYOR' ] === 'true' ;
9
- export const IS_TRAVIS = process . env [ 'TRAVIS' ] === 'true' ;
10
- export const IS_CI_SERVER = IS_TRAVIS || IS_APPVEYOR ;
7
+ export const IS_APPVEYOR = process . env . APPVEYOR === 'true' ;
8
+ export const IS_TRAVIS = process . env . TRAVIS === 'true' ;
9
+ export const IS_VSTS = process . env . TF_BUILD === 'true' ;
10
+ export const IS_CI_SERVER = IS_TRAVIS || IS_APPVEYOR || IS_VSTS ;
11
11
export const TEST_TIMEOUT = 25000 ;
12
12
export const IS_MULTI_ROOT_TEST = isMultitrootTest ( ) ;
13
- export const IS_CI_SERVER_TEST_DEBUGGER = process . env [ ' IS_CI_SERVER_TEST_DEBUGGER' ] === '1' ;
13
+ export const IS_CI_SERVER_TEST_DEBUGGER = process . env . IS_CI_SERVER_TEST_DEBUGGER === '1' ;
14
14
// If running on CI server, then run debugger tests ONLY if the corresponding flag is enabled.
15
15
export const TEST_DEBUGGER = IS_CI_SERVER ? IS_CI_SERVER_TEST_DEBUGGER : true ;
16
16
@@ -19,4 +19,4 @@ function isMultitrootTest() {
19
19
}
20
20
21
21
export const IS_ANALYSIS_ENGINE_TEST =
22
- ! IS_TRAVIS && ( process . env [ ' VSC_PYTHON_ANALYSIS' ] === '1' || ! PythonSettings . getInstance ( ) . jediEnabled ) ;
22
+ ! IS_TRAVIS && ( process . env . VSC_PYTHON_ANALYSIS === '1' || ! PythonSettings . getInstance ( ) . jediEnabled ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ if ((Reflect as any).metadata === undefined) {
3
3
// tslint:disable-next-line:no-require-imports no-var-requires
4
4
require ( 'reflect-metadata' ) ;
5
5
}
6
- import { IS_CI_SERVER , IS_CI_SERVER_TEST_DEBUGGER , IS_MULTI_ROOT_TEST } from './constants' ;
6
+
7
+ import { IS_CI_SERVER , IS_CI_SERVER_TEST_DEBUGGER ,
8
+ IS_MULTI_ROOT_TEST , IS_VSTS } from './constants' ;
7
9
import * as testRunner from './testRunner' ;
8
10
9
11
process . env . VSC_PYTHON_CI_TEST = '1' ;
@@ -13,15 +15,14 @@ process.env.IS_MULTI_ROOT_TEST = IS_MULTI_ROOT_TEST.toString();
13
15
// We do this to ensure we only run debugger test, as debugger tests are very flaky on CI.
14
16
// So the solution is to run them separately and first on CI.
15
17
const grep = IS_CI_SERVER && IS_CI_SERVER_TEST_DEBUGGER ? 'Debug' : undefined ;
16
-
17
18
const testFilesSuffix = process . env . TEST_FILES_SUFFIX ;
18
19
19
20
// You can directly control Mocha options by uncommenting the following lines.
20
21
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info.
21
22
// Hack, as retries is not supported as setting in tsd.
22
23
const options : testRunner . SetupOptions & { retries : number } = {
23
24
ui : 'tdd' ,
24
- useColors : true ,
25
+ useColors : ! IS_VSTS ,
25
26
timeout : 25000 ,
26
27
retries : 3 ,
27
28
grep,
You can’t perform that action at this time.
0 commit comments