#!/bin/sh # Core tests outside Unity: builds the rules (netstandard2.1, C# 9 = Unity's level) and runs # every suite with the .NET SDK. The JSON protocol goes to $LUNE_TEST_REPORT # (default tools/out/core-tests-dotnet.json; milestone logs live in docs/port/logs//). # Optional: REGENERATE_GOLDEN=1 re-creates the Godot references first (needs ../saumwacht-godot). set -eu cd "$(dirname "$0")/.." if [ "${REGENERATE_GOLDEN:-0}" = "1" ]; then sh tools/godot-golden/run_godot.sh content_export --out="$PWD/Assets/Luneraria/Tests/Core/Golden/content.json" sh tools/godot-golden/run_godot.sh golden_scenarios --in="$PWD/Assets/Luneraria/Tests/Core/Golden/scenarios.json" --out="$PWD/Assets/Luneraria/Tests/Core/Golden/golden.json" fi dotnet build tools/dotnet/Luneraria.Core/Luneraria.Core.csproj -c Release -nologo -v q dotnet build tools/dotnet/Luneraria.Core.Tests/Luneraria.Core.Tests.csproj -c Release -nologo -v q LUNE_TEST_REPORT="${LUNE_TEST_REPORT:-$PWD/tools/out/core-tests-dotnet.json}" \ dotnet tools/out/dotnet/bin/Luneraria.Core.Tests/Release/net8.0/Luneraria.Core.Tests.dll "$@"