-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
# -e VSTEST_HOST_DEBUG=1 ` | ||
$mydir = $PSScriptRoot | ||
$project = './test/LockCheck.Tests/LockCheck.Tests.csproj' | ||
$dotnet = '/usr/share/dotnet/dotnet' | ||
|
||
$script = "$dotnet test -c Release -f net8.0 && $dotnet test -c Debug -f net8.0" | ||
$script = $script.Replace("`r", "") | ||
|
||
docker run --rm --name LockCheck.Tests -v ${mydir}/..:/mnt/lc -w /mnt/lc mcr.microsoft.com/dotnet/sdk:8.0 bash -c $script | ||
docker run --rm --name LockCheck.Tests -v ${PSScriptRoot}/..:/mnt/lc -w /mnt/lc mcr.microsoft.com/dotnet/sdk:8.0 bash /mnt/lc/test/test-linux.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
frameworks=('net8.0') | ||
configurations=('Release' 'Debug') | ||
platforms=('x64') | ||
project="$(dirname $0)/LockCheck.Tests/LockCheck.Tests.csproj" | ||
|
||
for framework in "${frameworks[@]}"; do | ||
for configuration in "${configurations[@]}"; do | ||
for platform in "${platforms[@]}"; do | ||
echo -e "\n\033[34m[$framework - $configuration - $platform]\033[0m" | ||
/usr/share/dotnet/dotnet test --logger console -c $configuration -f $framework -a $platform $project || exit 1 | ||
done | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# Simply run all test assemblies that are found in the tree. | ||
# If we have builds for debug and release, they are both run. | ||
# Requires that vstest.console.exe is in the PATH. | ||
|
||
$frameworks = ('net481', 'net8.0') | ||
$configurations = ('Debug', 'Release') | ||
$platforms = ('x86', 'x64') | ||
$assemblies = Get-ChildItem LockCheck.Tests.dll -Recurse | where { $_.FullName -like "*\bin\*" } | ||
$project = "$PSScriptRoot\LockCheck.Tests\LockCheck.Tests.csproj" | ||
|
||
foreach ($assembly in $assemblies) { | ||
foreach ($framework in $frameworks) { | ||
foreach ($platform in $platforms) { | ||
echo "vstest.console.exe $assembly /Platform:$platform" | ||
& vstest.console.exe $assembly /Platform:$platform | ||
if ($LASTEXITCODE -ne 0) { | ||
exit 1 | ||
foreach ($configuration in $configurations) { | ||
Write-Host -Foreground DarkBlue "`n[$framework - $configuration - $platform]" | ||
|
||
& dotnet test -c $configuration -f $framework -a $platform $project | ||
if ($LASTEXITCODE -ne 0) { | ||
exit 1 | ||
} | ||
} | ||
} | ||
} | ||
} |