diff options
author | Derek Bailey <derekbailey@google.com> | 2020-10-27 22:51:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 22:51:58 -0700 |
commit | 0dfcc0a378346810b6294c66dc738c21fb9b75e3 (patch) | |
tree | fb23ac246729ce4fc757c636ca6af24b1860ff63 | |
parent | f9a18ea63593b42819eac2d60b8974cd5ef90fa0 (diff) | |
download | flatbuffers-0dfcc0a378346810b6294c66dc738c21fb9b75e3.tar.gz flatbuffers-0dfcc0a378346810b6294c66dc738c21fb9b75e3.tar.bz2 flatbuffers-0dfcc0a378346810b6294c66dc738c21fb9b75e3.zip |
Adds NetTest.bat to run .NET Core tests on Windows (#6216)
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | tests/FlatBuffers.Test/NetTest.bat | 20 |
2 files changed, 22 insertions, 1 deletions
@@ -135,4 +135,5 @@ js/**/*.d.ts mjs/**/*.js mjs/**/*.d.ts yarn-error.log -.cache/
\ No newline at end of file +.cache/ +.cmake/
\ No newline at end of file diff --git a/tests/FlatBuffers.Test/NetTest.bat b/tests/FlatBuffers.Test/NetTest.bat new file mode 100644 index 00000000..3b88b53e --- /dev/null +++ b/tests/FlatBuffers.Test/NetTest.bat @@ -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% |