11# Copyright (c) Microsoft Corporation.
22# Licensed under the MIT License.
33
4- Describe " Localized resource files validation" - Tags " CI" {
4+ Describe " LocProject.json file validation" - Tags " CI" {
55 BeforeAll {
6- $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ../ ../ ../ ..)).Path
6+ # # The 'LocProject.json' tests depend on running from a local PowerShell repo.
7+ $skipTests = $env: PIPELINE_REPOSITORY_NAME -eq ' Release-Automation'
8+ if ($skipTests ) {
9+ Write-Host " Skipping 'LocProject.json' tests in Release Automation." - ForegroundColor Yellow
10+ return
11+ }
712
13+ $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ../ ../ ../ ..)).Path
814 $locProjectPath = Join-Path $repoRoot ' Localize' ' LocProject.json'
9- $content = Get-Content - Path $locProjectPath - Raw
10- $locProject = ConvertFrom-Json - InputObject $content
15+ $content = Get-Content - Path $locProjectPath - Raw - ErrorAction Stop
16+ $locProject = ConvertFrom-Json - InputObject $content - ErrorAction Stop
1117 }
1218
13- It ' Validate LocItems in LocProject.json' {
19+ It ' Validate LocItems in LocProject.json' - Skip: $skipTests {
1420 $locProject.Projects.Count | Should - Be 1
1521 $project = $locProject.Projects [0 ]
1622 $project.LanguageSet | Should - BeExactly ' VS_Main_Languages'
@@ -28,7 +34,7 @@ Describe "Localized resource files validation" -Tags "CI" {
2834 }
2935 }
3036
31- It ' Validate total resource count' {
37+ It ' Validate total resource count' - Skip: $skipTests {
3238 $srcDir = Join-Path $repoRoot ' src'
3339 $project = $locProject.Projects [0 ]
3440
0 commit comments