Retire legacy sources and verify managed iOS deployment
This commit is contained in:
@@ -5,30 +5,6 @@ namespace VoiceCat.Tests;
|
||||
|
||||
public class ManagedCliTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task ManagedCliInteroperatesWithExistingCppCli()
|
||||
{
|
||||
string? nativeCli = Environment.GetEnvironmentVariable("VOICECAT_VCCLI");
|
||||
if (string.IsNullOrEmpty(nativeCli)) return; // Full conformance runs set this explicitly.
|
||||
await using var fixture = new ServerFixture();
|
||||
string cli = Path.Combine(FindRoot(), "dotnet", "src", "VoiceCat.Cli", "bin", "Release", "net10.0", "VoiceCat.Cli.dll");
|
||||
using Process managed = Start(cli, fixture, "Managed", "Managed checkpoint", "Native checkpoint", 2);
|
||||
await Task.Delay(750); // Native vccli sends its one-shot text immediately after auth.
|
||||
var nativeStart = new ProcessStartInfo(nativeCli) { WorkingDirectory = fixture.Directory, RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false, CreateNoWindow = true };
|
||||
foreach (string argument in new[] { "--host", "127.0.0.1", "--port", fixture.Server.EndPoint.Port.ToString(), "--nick", "Native",
|
||||
"--channel", "2", "--text", "Native checkpoint", "--test-tone-ms", "5000" }) nativeStart.ArgumentList.Add(argument);
|
||||
using Process native = Process.Start(nativeStart)!;
|
||||
Task<string> managedOut = managed.StandardOutput.ReadToEndAsync(), managedError = managed.StandardError.ReadToEndAsync();
|
||||
Task<string> nativeOut = native.StandardOutput.ReadToEndAsync(), nativeError = native.StandardError.ReadToEndAsync();
|
||||
using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(35));
|
||||
await Task.WhenAll(managed.WaitForExitAsync(timeout.Token), native.WaitForExitAsync(timeout.Token));
|
||||
string mout = await managedOut, nout = await nativeOut;
|
||||
Assert.True(managed.ExitCode == 0, await managedError + Environment.NewLine + mout);
|
||||
Assert.True(native.ExitCode == 0, await nativeError + Environment.NewLine + nout);
|
||||
Assert.Contains("Native checkpoint", mout); Assert.Contains("Managed checkpoint", nout);
|
||||
Assert.Contains("[test-tone] received=", nout); Assert.DoesNotContain("\"voiceEnergy\":0", mout);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(1u)]
|
||||
[InlineData(2u)]
|
||||
|
||||
Reference in New Issue
Block a user