Skip to content

Commit ae2bf7e

Browse files
committed
Rebase changes
1 parent 85e0400 commit ae2bf7e

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/test/constants.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
// tslint:disable:no-string-literal
54
import { workspace } from 'vscode';
65
import { PythonSettings } from '../client/common/configSettings';
76

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;
1111
export const TEST_TIMEOUT = 25000;
1212
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';
1414
// If running on CI server, then run debugger tests ONLY if the corresponding flag is enabled.
1515
export const TEST_DEBUGGER = IS_CI_SERVER ? IS_CI_SERVER_TEST_DEBUGGER : true;
1616

@@ -19,4 +19,4 @@ function isMultitrootTest() {
1919
}
2020

2121
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);

src/test/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ if ((Reflect as any).metadata === undefined) {
33
// tslint:disable-next-line:no-require-imports no-var-requires
44
require('reflect-metadata');
55
}
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';
79
import * as testRunner from './testRunner';
810

911
process.env.VSC_PYTHON_CI_TEST = '1';
@@ -13,15 +15,14 @@ process.env.IS_MULTI_ROOT_TEST = IS_MULTI_ROOT_TEST.toString();
1315
// We do this to ensure we only run debugger test, as debugger tests are very flaky on CI.
1416
// So the solution is to run them separately and first on CI.
1517
const grep = IS_CI_SERVER && IS_CI_SERVER_TEST_DEBUGGER ? 'Debug' : undefined;
16-
1718
const testFilesSuffix = process.env.TEST_FILES_SUFFIX;
1819

1920
// You can directly control Mocha options by uncommenting the following lines.
2021
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info.
2122
// Hack, as retries is not supported as setting in tsd.
2223
const options: testRunner.SetupOptions & { retries: number } = {
2324
ui: 'tdd',
24-
useColors: true,
25+
useColors: !IS_VSTS,
2526
timeout: 25000,
2627
retries: 3,
2728
grep,

0 commit comments

Comments
 (0)