Skip to content

Commit 28c052a

Browse files
authored
Merge pull request #5555 from Microsoft/users/kavipriya/rtw2018fix
Users/kavipriya/rtw2018fix
2 parents 471928d + 0b3b7a3 commit 28c052a

18 files changed

+54
-3
lines changed

Tasks/VsTest/helpers.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,11 @@ export class Helper {
162162

163163
return argument;
164164
}
165-
165+
166+
public static setConsoleCodePage() {
167+
tl.debug("Changing active code page to UTF-8");
168+
const chcp = tl.tool(path.resolve(process.env.windir, "system32", "chcp.com"));
169+
chcp.arg(["65001"]);
170+
chcp.execSync({ silent: true } as tr.IExecSyncOptions);
171+
}
166172
}

Tasks/VsTest/runvstest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ci.publishEvent(taskProps);
1414
try {
1515
tl.setResourcePath(path.join(__dirname, 'task.json'));
1616

17+
utils.Helper.setConsoleCodePage();
1718
const useDtaExecutionEngine = isDtaEngineRequired();
1819
if (useDtaExecutionEngine) {
1920
ci.publishEvent({ runmode: 'distributedtest', parallelism: tl.getVariable('System.ParallelExecutionType'),

Tasks/VsTest/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 2,
1919
"Minor": 1,
20-
"Patch": 8
20+
"Patch": 9
2121
},
2222
"demands": [
2323
"vstest"

Tasks/VsTest/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 2,
1919
"Minor": 1,
20-
"Patch": 8
20+
"Patch": 9
2121
},
2222
"demands": [
2323
"vstest"

Tests-Legacy/L0/VsTest/vs2015.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"wmic datafile where name='\\\\vs\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe' get Version /Value": {
3232
"code": 0,
3333
"stdout" : "version=14.0.0.0"
34+
},
35+
"C:\\WINDOWS\\system32\\chcp.com 65001": {
36+
"code": 0
3437
}
3538
},
3639
"rmRF": {

Tests-Legacy/L0/VsTest/vs2017.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"wmic datafile where name='\\\\vs2017\\\\installation\\\\folder\\\\Common7\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe' get Version /Value": {
3232
"code": 0,
3333
"stdout" : "version=15.0.0.0"
34+
},
35+
"C:\\WINDOWS\\system32\\chcp.com 65001": {
36+
"code": 0
3437
}
3538
},
3639
"rmRF": {

Tests-Legacy/L0/VsTest/vstestFails.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"wmic datafile where name='\\\\vs\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe' get Version /Value": {
2727
"code": 0,
2828
"stdout" : "version=14.0.0.0"
29+
},
30+
"C:\\WINDOWS\\system32\\chcp.com 65001": {
31+
"code": 0
2932
}
3033
},
3134
"rmRF": {

Tests-Legacy/L0/VsTest/vstestGood.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109
"wmic datafile where name='\\\\vs2017\\\\installation\\\\folder\\\\Common7\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe' get Version /Value": {
110110
"code": 0,
111111
"stdout" : "version=15.0.0.0"
112+
},
113+
"C:\\WINDOWS\\system32\\chcp.com 65001": {
114+
"code": 0
112115
}
113116
},
114117

Tests-Legacy/L0/VsTest/vstestGoodRunInParallel.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
"wmic datafile where name='\\\\vs2017\\\\installation\\\\folder\\\\Common7\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe' get Version /Value": {
4040
"code": 0,
4141
"stdout": "version=15.0.0.0"
42+
},
43+
"C:\\WINDOWS\\system32\\chcp.com 65001": {
44+
"code": 0
4245
}
4346
},
4447
"rmRF": {

Tests-Legacy/L0/VsTest/vstestGoodSysDebugFalse.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
"wmic datafile where name='\\\\vs\\\\IDE\\\\CommonExtensions\\\\Microsoft\\\\TestWindow\\\\vstest.console.exe' get Version /Value": {
3939
"code": 0,
4040
"stdout" : "version=14.0.0.0"
41+
},
42+
"C:\\WINDOWS\\system32\\chcp.com 65001": {
43+
"code": 0
4144
}
4245
},
4346
"rmRF": {

0 commit comments

Comments
 (0)