summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Bailey <derekbailey@google.com>2020-10-27 22:51:58 -0700
committerGitHub <noreply@github.com>2020-10-27 22:51:58 -0700
commit0dfcc0a378346810b6294c66dc738c21fb9b75e3 (patch)
treefb23ac246729ce4fc757c636ca6af24b1860ff63
parentf9a18ea63593b42819eac2d60b8974cd5ef90fa0 (diff)
downloadflatbuffers-0dfcc0a378346810b6294c66dc738c21fb9b75e3.tar.gz
flatbuffers-0dfcc0a378346810b6294c66dc738c21fb9b75e3.tar.bz2
flatbuffers-0dfcc0a378346810b6294c66dc738c21fb9b75e3.zip
Adds NetTest.bat to run .NET Core tests on Windows (#6216)
-rw-r--r--.gitignore3
-rw-r--r--tests/FlatBuffers.Test/NetTest.bat20
2 files changed, 22 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 1ff29a69..e02f8549 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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%