Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C#] Adds NetTest.bat to run .NET Core tests on Windows #6216

Merged
merged 1 commit into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@ js/**/*.d.ts
mjs/**/*.js
mjs/**/*.d.ts
yarn-error.log
.cache/
.cache/
.cmake/
20 changes: 20 additions & 0 deletions tests/FlatBuffers.Test/NetTest.bat
Original file line number Diff line number Diff line change
@@ -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%