Skip to content

Commit

Permalink
futher fix other scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingzhe Huang (from Dev Box) committed Oct 12, 2024
1 parent 0bce1cb commit fe86d38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ $directories = Get-ChildItem -Path "$cadlRanchRoot" -Directory -Recurse
$cadlRanchCsproj = Join-Path $packageRoot 'generator' 'TestProjects' 'CadlRanch.Tests' 'TestProjects.CadlRanch.Tests.csproj'

$coverageDir = Join-Path $packageRoot 'generator' 'artifacts' 'coverage'
# absolute path to locally built emitter module
$emitterPath = Resolve-Path (Join-Path $PSScriptRoot '..' '..' 'dist' 'emitter\')

if (-not (Test-Path $coverageDir)) {
New-Item -ItemType Directory -Path $coverageDir | Out-Null
Expand All @@ -34,7 +36,7 @@ foreach ($directory in $directories) {
$specFile = Join-Path $specsDirectory $subPath "main.tsp"
}

$command = Get-TspCommand $specFile $outputDir
$command = Get-TspCommand $specFile $outputDir $false $emitterPath
Invoke $command
# exit if the generation failed
if ($LASTEXITCODE -ne 0) {
Expand Down
4 changes: 3 additions & 1 deletion packages/http-client-csharp/eng/scripts/Test-CadlRanch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ $directories = Get-ChildItem -Path "$cadlRanchRoot" -Directory -Recurse
$cadlRanchCsproj = Join-Path $packageRoot 'generator' 'TestProjects' 'CadlRanch.Tests' 'TestProjects.CadlRanch.Tests.csproj'

$coverageDir = Join-Path $packageRoot 'generator' 'artifacts' 'coverage'
# absolute path to locally built emitter module
$emitterPath = Resolve-Path (Join-Path $PSScriptRoot '..' '..' 'dist' 'emitter\')

if (-not (Test-Path $coverageDir)) {
New-Item -ItemType Directory -Path $coverageDir | Out-Null
Expand Down Expand Up @@ -57,7 +59,7 @@ foreach ($directory in $directories) {
$specFile = Join-Path $specsDirectory $subPath "main.tsp"
}

$command = Get-TspCommand $specFile $outputDir
$command = Get-TspCommand $specFile $outputDir $false $emitterPath
Invoke $command
# exit if the generation failed
if ($LASTEXITCODE -ne 0) {
Expand Down

0 comments on commit fe86d38

Please sign in to comment.