[C#] Cleaned up .NET testing script for Mono (#6016)

* Cleaned up .NET testing script for Mono

Cleaned up the .NET testing script to make it a little better. It
purposefully doesn't delete the .NET installer and SDk after running the
script, so that they can be used in subsequent invocations. This greatly
speeds up the script.

The downloaded files are ignored by git by default. They can be
explicitly cleaned up by runnning the clean script (clean.sh).

* Trying using older Version indicator

* Remove lins to monsterdata and reference it directly.

* Updated appveryor script to remove copying of files no longer needed

* Continue to update appveyor script to work. Disabled CS0169 in ByteBufferTest
This commit is contained in:
Derek Bailey
2020-08-17 13:10:10 -07:00
committed by GitHub
parent 63cc0eec4e
commit db2aa9b4ec
9 changed files with 92 additions and 42 deletions

View File

@@ -114,13 +114,13 @@ namespace FlatBuffers.Test
// Dump to output directory so we can inspect later, if needed
#if ENABLE_SPAN_T
var data = fbb.DataBuffer.ToSizedArray();
string filename = @"Resources/monsterdata_cstest" + (sizePrefix ? "_sp" : "") + ".mon";
string filename = @".tmp/monsterdata_cstest" + (sizePrefix ? "_sp" : "") + ".mon";
File.WriteAllBytes(filename, data);
#else
using (var ms = fbb.DataBuffer.ToMemoryStream(fbb.DataBuffer.Position, fbb.Offset))
{
var data = ms.ToArray();
string filename = @"Resources/monsterdata_cstest" + (sizePrefix ? "_sp" : "") + ".mon";
string filename = @".tmp/monsterdata_cstest" + (sizePrefix ? "_sp" : "") + ".mon";
File.WriteAllBytes(filename, data);
}
#endif
@@ -282,7 +282,7 @@ namespace FlatBuffers.Test
[FlatBuffersTestMethod]
public void CanReadCppGeneratedWireFile()
{
var data = File.ReadAllBytes(@"Resources/monsterdata_test.mon");
var data = File.ReadAllBytes(@"../monsterdata_test.mon");
var bb = new ByteBuffer(data);
TestBuffer(bb);
TestObjectAPI(Monster.GetRootAsMonster(bb));
@@ -291,7 +291,7 @@ namespace FlatBuffers.Test
[FlatBuffersTestMethod]
public void CanReadJsonFile()
{
var jsonText = File.ReadAllText(@"Resources/monsterdata_test.json");
var jsonText = File.ReadAllText(@"../monsterdata_test.json");
var mon = MonsterT.DeserializeFromJson(jsonText);
var fbb = new FlatBufferBuilder(1);
fbb.Finish(Monster.Pack(fbb, mon).Value);