-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(24.10): add test for dotnet-runtime-9.0
- Loading branch information
1 parent
98f59e5
commit e9a885f
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
tests/spread/integration/dotnet-runtime-9.0/app_helloworld/Hello.csproj
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,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
1 change: 1 addition & 0 deletions
1
tests/spread/integration/dotnet-runtime-9.0/app_helloworld/Program.cs
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 @@ | ||
Console.WriteLine("Hello, World!"); |
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,30 @@ | ||
summary: Integration tests for .NET 9 Runtime | ||
|
||
execute: | | ||
# install slices | ||
rootfs="$(install-slices dotnet-runtime-9.0_libs base-files_base bash_bins coreutils_directory-listing)" | ||
mv $rootfs/usr/lib/dotnet/dotnet9 $rootfs/usr/lib/dotnet/dotnet | ||
ln -s ../lib/dotnet/dotnet $rootfs/usr/bin/dotnet | ||
# smoking test the .NET runtime | ||
chroot "$rootfs" /usr/bin/dotnet --info | ||
# preparing the test data | ||
apt update && apt install -y dotnet-sdk-9.0 | ||
cp -r app_helloworld $rootfs/app_helloworld | ||
cp -r app_helloworld $rootfs/app_helloworld-self-contained | ||
# chroot "$rootfs" dotnet publish /dotnet/tests/app_helloworld/src/Hello.csproj --no-self-contained | ||
# chroot "$rootfs" dotnet publish /dotnet/tests/app_helloworld-self-contained/src/Hello.csproj --self-contained | ||
dotnet publish $rootfs/app_helloworld/Hello.csproj --no-self-contained | ||
dotnet publish $rootfs/app_helloworld-self-contained/Hello.csproj --self-contained | ||
mkdir -p "${rootfs}"/proc | ||
mount --bind /proc "${rootfs}"/proc | ||
# test the helloworld app | ||
chroot "$rootfs" dotnet /app_helloworld/bin/Release/net9.0/Hello.dll | ||
# test the helloworld self-contained app | ||
for dll in $(ls /app_helloworld-self-contained/bin/Release/net9.0/linux-*/Hello.dll); do | ||
chroot "$rootfs" dotnet $dll | ||
done |