Skip to content

Commit 47c16e2

Browse files
authored
Merge pull request #697 from microsoft/tyriar/conpty4
Disable APIScan and reduce test flakiness on Windows
2 parents 5874200 + 59f5d47 commit 47c16e2

File tree

3 files changed

+67
-67
lines changed

3 files changed

+67
-67
lines changed

azure-pipelines.yml

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -93,72 +93,72 @@ extends:
9393
npm run lint
9494
displayName: 'Lint'
9595
96-
- job: APIScan
97-
dependsOn: []
98-
pool:
99-
name: 1es-oss-windows-2022-x64
100-
os: Windows
101-
strategy:
102-
matrix:
103-
node_18_x:
104-
node_version: 18.x
105-
steps:
106-
- task: NodeTool@0
107-
inputs:
108-
versionSpec: $(node_version)
109-
displayName: 'Install Node.js'
110-
- pwsh: |
111-
$includes = @'
112-
{
113-
'target_defaults': {
114-
'conditions': [
115-
['OS=="win"', {
116-
'msvs_settings': {
117-
'VCCLCompilerTool': {
118-
'AdditionalOptions': [
119-
'/Zi',
120-
'/FS'
121-
],
122-
},
123-
'VCLinkerTool': {
124-
'AdditionalOptions': [
125-
'/profile'
126-
]
127-
}
128-
}
129-
}]
130-
]
131-
}
132-
}
133-
'@
96+
# - job: APIScan
97+
# dependsOn: []
98+
# pool:
99+
# name: 1es-oss-windows-2022-x64
100+
# os: Windows
101+
# strategy:
102+
# matrix:
103+
# node_18_x:
104+
# node_version: 18.x
105+
# steps:
106+
# - task: NodeTool@0
107+
# inputs:
108+
# versionSpec: $(node_version)
109+
# displayName: 'Install Node.js'
110+
# - pwsh: |
111+
# $includes = @'
112+
# {
113+
# 'target_defaults': {
114+
# 'conditions': [
115+
# ['OS=="win"', {
116+
# 'msvs_settings': {
117+
# 'VCCLCompilerTool': {
118+
# 'AdditionalOptions': [
119+
# '/Zi',
120+
# '/FS'
121+
# ],
122+
# },
123+
# 'VCLinkerTool': {
124+
# 'AdditionalOptions': [
125+
# '/profile'
126+
# ]
127+
# }
128+
# }
129+
# }]
130+
# ]
131+
# }
132+
# }
133+
# '@
134134

135-
if (!(Test-Path "~/.gyp")) {
136-
mkdir "~/.gyp"
137-
echo $includes > "~/.gyp/include.gypi"
138-
}
139-
displayName: Create include.gypi
140-
- script: |
141-
npm i
142-
displayName: 'Install dependencies and build'
135+
# if (!(Test-Path "~/.gyp")) {
136+
# mkdir "~/.gyp"
137+
# echo $includes > "~/.gyp/include.gypi"
138+
# }
139+
# displayName: Create include.gypi
140+
# - script: |
141+
# npm i
142+
# displayName: 'Install dependencies and build'
143143

144-
- task: APIScan@2
145-
inputs:
146-
softwareFolder: $(Build.SourcesDirectory)\build\Release
147-
softwareName: 'vscode-node-pty'
148-
softwareVersionNum: '1'
149-
isLargeApp: false
150-
toolVersion: 'Latest'
151-
displayName: Run ApiScan
152-
condition: succeeded()
153-
env:
154-
AzureServicesAuthConnectionString: $(apiscan-connectionstring)
144+
# - task: APIScan@2
145+
# inputs:
146+
# softwareFolder: $(Build.SourcesDirectory)\build\Release
147+
# softwareName: 'vscode-node-pty'
148+
# softwareVersionNum: '1'
149+
# isLargeApp: false
150+
# toolVersion: 'Latest'
151+
# displayName: Run ApiScan
152+
# condition: succeeded()
153+
# env:
154+
# AzureServicesAuthConnectionString: $(apiscan-connectionstring)
155155

156-
- task: PublishSecurityAnalysisLogs@3
157-
inputs:
158-
ArtifactName: CodeAnalysisLogs
159-
ArtifactType: Container
160-
PublishProcessedResults: false
161-
AllTools: true
156+
# - task: PublishSecurityAnalysisLogs@3
157+
# inputs:
158+
# ArtifactName: CodeAnalysisLogs
159+
# ArtifactType: Container
160+
# PublishProcessedResults: false
161+
# AllTools: true
162162

163163
- stage: Release
164164
dependsOn: Build

src/windowsPtyAgent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ export class WindowsPtyAgent {
145145
if (this._exitCode !== undefined) {
146146
throw new Error('Cannot resize a pty that has already exited');
147147
}
148-
this._ptyNative.resize(this._pty, cols, rows, this._useConptyDll);
148+
(this._ptyNative as IConptyNative).resize(this._pty, cols, rows, this._useConptyDll);
149149
return;
150150
}
151-
this._ptyNative.resize(this._pid, cols, rows, this._useConptyDll);
151+
(this._ptyNative as IWinptyNative).resize(this._pid, cols, rows);
152152
}
153153

154154
public clear(): void {

src/windowsTerminal.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if (process.platform === 'win32') {
9898
(<any>term)._defer(done);
9999
});
100100
it('should kill the process tree', function (done: Mocha.Done): void {
101-
this.timeout(5000);
101+
this.timeout(10000);
102102
const term = new WindowsTerminal('cmd.exe', [], { useConpty });
103103
// Start sub-processes
104104
term.write('powershell.exe\r');
@@ -134,7 +134,7 @@ if (process.platform === 'win32') {
134134
it('should throw a non-native exception when resizing a killed terminal', (done) => {
135135
const term = new WindowsTerminal('cmd.exe', [], { useConpty });
136136
(<any>term)._defer(() => {
137-
term.on('exit', () => {
137+
term.once('exit', () => {
138138
assert.throws(() => term.resize(1, 1));
139139
done();
140140
});

0 commit comments

Comments
 (0)