Single file publish support, test project and simple build CI
This also adds remote raspberry pi debugging with default install details. More testing is required as MonoMod may not be working for arm64 still CI might not work yet either
This commit is contained in:
parent
c159f2b388
commit
2c36dacfd2
8 changed files with 241 additions and 29 deletions
31
TShockLauncher.Tests/ServerInitTests.cs
Normal file
31
TShockLauncher.Tests/ServerInitTests.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace TShockLauncher.Tests
|
||||
{
|
||||
[TestClass]
|
||||
public class ServerInitTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void EnsureBoots()
|
||||
{
|
||||
var are = new AutoResetEvent(false);
|
||||
On.Terraria.Main.hook_DedServ cb = (On.Terraria.Main.orig_DedServ orig, Terraria.Main instance) =>
|
||||
{
|
||||
are.Set();
|
||||
Debug.WriteLine("Server init process successful");
|
||||
};
|
||||
On.Terraria.Main.DedServ += cb;
|
||||
|
||||
new Thread(() => TerrariaApi.Server.Program.Main(new string[] { })).Start();
|
||||
|
||||
var hit = are.WaitOne(TimeSpan.FromSeconds(10));
|
||||
|
||||
On.Terraria.Main.DedServ -= cb;
|
||||
|
||||
Assert.AreEqual(true, hit);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue