mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-21 00:56:28 +08:00
f061c2d7da
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Klaus Landsdorf <kl@iniationware.com> Co-authored-by: Marc Schier <marcschier@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com> Co-authored-by: romanett <7413710+romanett@users.noreply.github.com>
50 lines
1.3 KiB
Batchfile
50 lines
1.3 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo This script is used to run custom platform tests for the UA Core Library
|
|
echo Supported parameters: net48, net8.0, net9.0, net10.0
|
|
|
|
REM Check if the target framework parameter is provided
|
|
if "%1"=="" (
|
|
echo Usage: %0 [TargetFramework]
|
|
echo Allowed values for TargetFramework: net48, net8.0, net9.0, net10.0, default
|
|
goto :eof
|
|
)
|
|
|
|
REM Check if the provided TargetFramework is valid
|
|
set "validFrameworks= default net48 net8.0 net9.0 net10.0 "
|
|
if "!validFrameworks: %1 =!"=="%validFrameworks%" (
|
|
echo Invalid TargetFramework specified. Allowed values are: net48, net8.0, net9.0, net10.0, default
|
|
goto :eof
|
|
)
|
|
|
|
if "%1"=="default" (
|
|
echo Using the default targets for the test runners.
|
|
goto :cleanup
|
|
)
|
|
|
|
REM this is the variable used to switch the build scripts to a dedicated target
|
|
echo Using the %1 CustomTestTargets for the test runners.
|
|
set CustomTestTarget=%1
|
|
|
|
:cleanup
|
|
|
|
REM clean up all obj and bin folders
|
|
|
|
REM Set the root directory path as batch file location
|
|
set "root=%~dp0"
|
|
|
|
REM Delete 'obj' and 'bin' folders
|
|
for /d /r "%root%" %%d in (*obj *bin) do (
|
|
echo Deleting "%%d"
|
|
del /S /F /Q "%%d\*.*"
|
|
rmdir /s /q "%%d"
|
|
)
|
|
|
|
echo Clean up complete.
|
|
|
|
echo restore %1
|
|
dotnet restore -f "..\UA.slnx"
|
|
dotnet build --no-restore "..\UA.slnx"
|
|
dotnet test "..\UA.slnx"
|