Skip to content

Commit d7025c8

Browse files
committed
Updated scripting to use string (constant) as the TFM for testing sample apps
* Updated path formation to make it OS independent. * While this is not a requirement at this point it was in the same area and sets the stage for true platform independence, which is a longer term goal. * Updated SLNX to reference correct test script
1 parent 3cfc563 commit d7025c8

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

Invoke-Tests.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,20 @@ try
4747

4848
# ensure the samples run - output not validated but they need to compile and run without crashing
4949
Write-Information 'Running sample apps for .NET Core'
50-
Push-Location (Join-path $buildInfo['BuildOutputPath'] 'bin\CodeGenWithDebugInfo\Release\net9.0')
50+
$sampleTFM = "net8.0"
51+
Push-Location (Join-path $buildInfo['BuildOutputPath'] 'bin' 'CodeGenWithDebugInfo' 'Release' $sampleTFM)
5152
try
5253
{
5354
$testGenOutputPath = Join-Path $buildInfo['TestResultsPath'] 'M3'
54-
Write-Information "CodeGenWithDebugInfo M3 'Support Files\test.c' $testGenOutputPath"
55-
Invoke-External dotnet CodeGenWithDebugInfo.dll M3 'Support Files\test.c' $testGenOutputPath
55+
$testFileRelativePath = Join-Path 'Support Files' 'test.c'
56+
Write-Information "CodeGenWithDebugInfo M3 '$testFileRelativePath' $testGenOutputPath"
57+
Invoke-External dotnet CodeGenWithDebugInfo.dll M3 $testFileRelativePath $testGenOutputPath
5658

5759
$testGenOutputPath = Join-Path $buildInfo['TestResultsPath'] 'X64'
58-
Write-Information "CodeGenWithDebugInfo X64 'Support Files\test.c' $testGenOutputPath"
59-
Invoke-External dotnet CodeGenWithDebugInfo.dll X64 'Support Files\test.c' $testGenOutputPath
60+
Write-Information "CodeGenWithDebugInfo X64 '$testFileRelativePath' $testGenOutputPath"
61+
Invoke-External dotnet CodeGenWithDebugInfo.dll X64 $testFileRelativePath $testGenOutputPath
6062

61-
Set-Location (Join-path $buildInfo['BuildOutputPath'] 'bin\OrcV2VeryLazy\Release\net9.0')
63+
Set-Location (Join-path $buildInfo['BuildOutputPath'] 'bin' 'OrcV2VeryLazy' 'Release' $sampleTFM)
6264
Invoke-External dotnet OrcV2VeryLazy.dll
6365
}
6466
finally

src/Ubiquity.NET.Llvm.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<File Path="../global.json" />
2424
<File Path="../GOVERNANCE.md" />
2525
<File Path="../IgnoredWords.dic" />
26-
<File Path="../Invoke-UnitTests.ps1" />
26+
<File Path="../Invoke-Tests.ps1" />
2727
<File Path="../LICENSE.md" />
2828
<File Path="../NuGet.Config" />
2929
<File Path="../README.md" />

0 commit comments

Comments
 (0)