Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 068d52e

Browse files
Enable VS Code unit tests in Linux CI (#4503)
Now that they can run (with the addition of `xvfb`), resolves #4502.
1 parent 8f006fb commit 068d52e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎.vsts-ci/templates/ci-general.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ steps:
6969
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
7070
pwsh: true
7171

72+
# Necessary on Linux to run VS Code unit tests
73+
- bash: |
74+
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
75+
displayName: Start X virtual framebuffer
76+
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
77+
7278
# Tests in particular are run with either PowerShell Core or Windows PowerShell
7379
- task: PowerShell@2
7480
displayName: Run unit tests
@@ -82,6 +88,8 @@ steps:
8288
Invoke-Build -Configuration Release Test
8389
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
8490
pwsh: ${{ parameters.pwsh }}
91+
env:
92+
DISPLAY: ':99.0'
8593

8694
- task: PowerShell@2
8795
displayName: Assert PowerShellEditorServices release configuration

‎vscode-powershell.build.ps1‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ task Build Restore, {
109109
#endregion
110110
#region Test tasks
111111

112-
task Test -If (!($env:TF_BUILD-and$global:IsLinux)) Build, {
112+
task Test Build, {
113113
Write-Host "`n### Running extension tests" -ForegroundColor Green
114114
Invoke-BuildExec { & npm run test }
115115
# Reset the state of files modified by tests

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /