Skip to content

Commit 1963e6e

Browse files
committed
Set up net9.0 test run in all build scripts
1 parent 1724f8c commit 1963e6e

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ for:
6666
$wc = New-Object System.Net.WebClient
6767
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "Net80TestResults.xml"))
6868
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "Net80WeakNamedTestResults.xml"))
69+
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "Net90TestResults.xml"))
70+
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "Net90WeakNamedTestResults.xml"))
6971
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "DesktopClrTestResults.xml"))
7072
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "DesktopClrWeakNamedTestResults.xml"))
7173

build.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# ****************************************************************************
3-
# Copyright 2004-2022 Castle Project - http://www.castleproject.org/
3+
# Copyright 2004-2025 Castle Project - http://www.castleproject.org/
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
@@ -43,3 +43,24 @@ then
4343
echo "Net8.0 Tests have failed, failing the build"
4444
exit 1
4545
fi
46+
47+
echo ---------------------------
48+
echo Running NET9.0 Tests
49+
echo ---------------------------
50+
51+
dotnet ./src/Castle.Core.Tests/bin/Release/net9.0/Castle.Core.Tests.dll --result=Net90TestResults.xml;format=nunit3
52+
dotnet ./src/Castle.Core.Tests.WeakNamed/bin/Release/net9.0/Castle.Core.Tests.WeakNamed.dll --result=Net90WeakNamedTestResults.xml;format=nunit3
53+
54+
# Ensure that all test runs produced a protocol file:
55+
if [[ !( -f Net90TestResults.xml &&
56+
-f Net90WeakNamedTestResults.xml ) ]]; then
57+
echo "Incomplete test results. Some test runs might not have terminated properly. Failing the build."
58+
exit 1
59+
fi
60+
61+
NET90_FAILCOUNT=$(grep -F "One or more child tests had errors" Net90TestResults.xml Net90WeakNamedTestResults.xml | wc -l)
62+
if [ $NET90_FAILCOUNT -ne 0 ]
63+
then
64+
echo "Net9.0 Tests have failed, failing the build"
65+
exit 1
66+
fi

buildscripts/build.cmd

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@ECHO OFF
22
REM ****************************************************************************
3-
REM Copyright 2004-2022 Castle Project - http://www.castleproject.org/
3+
REM Copyright 2004-2025 Castle Project - http://www.castleproject.org/
44
REM Licensed under the Apache License, Version 2.0 (the "License");
55
REM you may not use this file except in compliance with the License.
66
REM You may obtain a copy of the License at
@@ -46,3 +46,10 @@ echo ---------------------------
4646

4747
dotnet .\src\Castle.Core.Tests\bin\%Configuration%\net8.0\Castle.Core.Tests.dll --result=Net80TestResults.xml;format=nunit3 || exit /b 1
4848
dotnet .\src\Castle.Core.Tests.WeakNamed\bin\%Configuration%\net8.0/Castle.Core.Tests.WeakNamed.dll --result=Net80WeakNamedTestResults.xml;format=nunit3 || exit /b 1
49+
50+
echo ---------------------------
51+
echo Running NET9.0 Tests
52+
echo ---------------------------
53+
54+
dotnet .\src\Castle.Core.Tests\bin\%Configuration%\net9.0\Castle.Core.Tests.dll --result=Net90TestResults.xml;format=nunit3 || exit /b 1
55+
dotnet .\src\Castle.Core.Tests.WeakNamed\bin\%Configuration%\net9.0/Castle.Core.Tests.WeakNamed.dll --result=Net90WeakNamedTestResults.xml;format=nunit3 || exit /b 1

0 commit comments

Comments
 (0)