Adds NetTest.bat to run .NET Core tests on Windows (#6216)

This commit is contained in:
Derek Bailey
2020-10-27 22:51:58 -07:00
committed by GitHub
parent f9a18ea635
commit 0dfcc0a378
2 changed files with 22 additions and 1 deletions

3
.gitignore vendored
View File

@@ -135,4 +135,5 @@ js/**/*.d.ts
mjs/**/*.js
mjs/**/*.d.ts
yarn-error.log
.cache/
.cache/
.cmake/

View File

@@ -0,0 +1,20 @@
@echo off
@REM Builds a .NET solution file, adds the project, builds it
@REM and executes it. Cleans up all generated files and directories.
set TEMP_BIN=.tmp
@REM Run the .NET Core tests
set CORE_FILE=FlatBuffers.Core.Test
set CORE_PROJ_FILE=%CORE_FILE%.csproj
set CORE_SLN_FILE=%CORE_FILE%.sln
dotnet new sln --force --name %CORE_FILE%
dotnet sln %CORE_SLN_FILE% add %CORE_PROJ_FILE%
dotnet build -c Release -o %TEMP_BIN% -v quiet %CORE_PROJ_FILE%
%TEMP_BIN%\%CORE_FILE%.exe
del /f %CORE_SLN_FILE%
@REM TODO(dbaileychess): Support the other configurations in NetTest.sh
@REM remove the temp bin directory, with files (/S) and quietly (/Q)
RD /S /Q %TEMP_BIN%