Unione di funzione/decoder-hevc in funzione/senza-terzi (catena della 0.3.0)
Porta in senza-terzi tutta la catena: documenti ed esportazione, S4b, codec delle immagini, H.264 e HEVC. Conflitti risolti tenendo le due parti: CI e Dockerfile di senza-terzi (solo comandi, Febe processo 1, un carattere) senza ffmpeg, che il ramo dei video ha tolto; categoria «da fare» di riepilogo-prove.sh tenuta; decisioni.md con tutte le righe, prima quelle della catena e poi quelle di C6; CLAUDE.md con le righe della CI di C6 senza ffmpeg; prove della pipeline con tutti e due i controlli. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
e4dbc5ad68
919 files changed
+65484
-1299
No files matched your search
@@ -0,0 +1,88 @@
|
||||
using System.Security;
|
||||
using Febe.Tests.Desktop.Support;
|
||||
using Febe.Tests.Support;
|
||||
|
||||
namespace Febe.Tests.Packaging;
|
||||
|
||||
/// <summary>
|
||||
/// The summary of the test results (.gitea/scripts/riepilogo-prove.sh), run on .trx files written here: the CI allows no
|
||||
/// skipped test, and the only inconclusive results that do not count as skipped are the «da fare» ones of
|
||||
/// H264ConformanceTests.FeaturesStillToDo, whose reason starts with «da fare: » right after the frame MSTest puts around
|
||||
/// it (in English or in Italian).
|
||||
/// </summary>
|
||||
public sealed partial class PipelineTests
|
||||
{
|
||||
private const string FeaturesStillToDo = "FeaturesStillToDo (\"SVCBST-19\",\"SVC, scalabilità spaziale\")";
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(120_000, CooperativeCancellation = true)]
|
||||
public async Task OnlyTheToDoConformanceStreamsMaySkipInTheCi()
|
||||
{
|
||||
var bash = RequireBash();
|
||||
|
||||
// The frames of MSTest, old and new, English and Italian: all «da fare», none skipped.
|
||||
var toDo = await RunSummaryAsync(bash,
|
||||
("Passed", "AnythingElse", null),
|
||||
("NotExecuted", FeaturesStillToDo, "Assert.Inconclusive. da fare: SVC, scalabilità spaziale"),
|
||||
("NotExecuted", FeaturesStillToDo, "Assert.Inconclusive failed. da fare: MVC, due viste, confronto bit per bit"),
|
||||
("NotExecuted", FeaturesStillToDo, "Assert.Inconclusive non riuscito. da fare: MVC, tre viste"),
|
||||
("Inconclusive", FeaturesStillToDo, "Assert.Inconclusive. da fare: SVC & <CGS>"));
|
||||
Assert.AreEqual(0, toDo.Code, toDo.Report);
|
||||
StringAssert.Contains(toDo.Output, "totale 5 · superate 1 · fallite 0 · saltate 0 · da fare 4", toDo.Report);
|
||||
StringAssert.Contains(toDo.Output, " - da fare: SVC & <CGS>", toDo.Report);
|
||||
|
||||
// Anything else inconclusive is a skipped test, and turns the verification red: another reason in
|
||||
// FeaturesStillToDo, «da fare: » not at the start of the reason, the same reason in another test.
|
||||
(string Name, string Message)[] skipped =
|
||||
[
|
||||
(FeaturesStillToDo, "Assert.Inconclusive. da verificare: MVC, due viste"),
|
||||
(FeaturesStillToDo, "Assert.Inconclusive. Manca Chromium; da fare: installarlo"),
|
||||
("ChromiumStartsInTheSandbox", "Assert.Inconclusive. da fare: niente"),
|
||||
("FeaturesStillToDoLater", "Assert.Inconclusive. da fare: niente"),
|
||||
];
|
||||
foreach (var (name, message) in skipped)
|
||||
{
|
||||
var run = await RunSummaryAsync(bash, ("Passed", "AnythingElse", null), ("NotExecuted", name, message));
|
||||
Assert.AreEqual(1, run.Code, $"{name}: {message}\n{run.Report}");
|
||||
StringAssert.Contains(run.Output, "totale 2 · superate 1 · fallite 0 · saltate 1 · da fare 0", run.Report);
|
||||
StringAssert.Contains(run.Errors, "Prove saltate: 1, più delle 0 ammesse.", run.Report);
|
||||
}
|
||||
|
||||
// The H.264 conformance tests write no other inconclusive reason: every Assert.Inconclusive there starts with it.
|
||||
var source = Read(Repository.PathOf("tests", "Febe.Tests", "Media", "H264", "H264ConformanceTests.cs"));
|
||||
var reasons = System.Text.RegularExpressions.Regex.Matches(source, @"Assert\.Inconclusive\(\$?""(?<reason>[^""]*)""");
|
||||
Assert.IsGreaterThanOrEqualTo(3, reasons.Count);
|
||||
foreach (System.Text.RegularExpressions.Match reason in reasons)
|
||||
{
|
||||
StringAssert.StartsWith(reason.Groups["reason"].Value, "da fare: ", reason.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>riepilogo-prove.sh with no skipped test allowed, on one .trx file of the given results.</summary>
|
||||
private async Task<(int Code, string Output, string Errors, string Report)> RunSummaryAsync(string bash, params (string Outcome, string Name, string? Message)[] results)
|
||||
{
|
||||
using var folder = new TempFolder("febe-riepilogo");
|
||||
var trx = new System.Text.StringBuilder("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TestRun xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\">\n <Results>\n");
|
||||
var id = 0;
|
||||
foreach (var (outcome, name, message) in results)
|
||||
{
|
||||
trx.Append($" <UnitTestResult executionId=\"e{id}\" testId=\"t{id}\" testName=\"{SecurityElement.Escape(name)}\" computerName=\"prova\" duration=\"00:00:00.0100000\" outcome=\"{outcome}\">");
|
||||
if (message is not null)
|
||||
{
|
||||
trx.Append($"\n <Output>\n <ErrorInfo>\n <Message>{SecurityElement.Escape(message)}</Message>\n </ErrorInfo>\n </Output>\n ");
|
||||
}
|
||||
|
||||
trx.Append("</UnitTestResult>\n");
|
||||
id++;
|
||||
}
|
||||
|
||||
trx.Append(" </Results>\n</TestRun>\n");
|
||||
await File.WriteAllTextAsync(folder.Combine("prove.trx"), trx.ToString(), TestContext.CancellationToken);
|
||||
var run = await RunProcessAsync(bash, ["--noprofile", "--norc", ".gitea/scripts/riepilogo-prove.sh", folder.Path.Replace('\\', '/'), "0"], start =>
|
||||
{
|
||||
start.Environment.Remove("GITHUB_STEP_SUMMARY");
|
||||
start.Environment.Remove("PROVE_SALTATE_AMMESSE");
|
||||
});
|
||||
return (run.Code, run.Output, run.Errors, $"codice {run.Code}\n{run.Output}\n{run.Errors}");
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public sealed partial class PipelineTests
|
||||
StringAssert.Contains(prove, $"--filter \"TestCategory={SyntheticSite.Category}\"");
|
||||
|
||||
var environment = Script("ambiente-prove.sh");
|
||||
foreach (var package in new[] { "chromium", "xvfb", "ffmpeg", "locales" })
|
||||
foreach (var package in new[] { "chromium", "xvfb", "locales" })
|
||||
{
|
||||
StringAssert.Contains(environment, package);
|
||||
}
|
||||
@@ -87,6 +87,14 @@ public sealed partial class PipelineTests
|
||||
Assert.DoesNotContain("apt-get", steps, $"{name}: {job} needs only the .NET SDK");
|
||||
}
|
||||
|
||||
// Videos are read and decoded in house: no ffmpeg in the CI, nor in the image (Alberto, 18 November 2026).
|
||||
var image = Code(Read(Repository.PathOf("docker", "Dockerfile")));
|
||||
foreach (var program in new[] { "ffmpeg", "ffprobe" })
|
||||
{
|
||||
Assert.IsFalse(environment.Contains(program, StringComparison.Ordinal), $"{program} non serve più alle prove");
|
||||
Assert.IsFalse(image.Contains(program, StringComparison.Ordinal), $"{program} non va nell'immagine");
|
||||
}
|
||||
|
||||
// tests/Febe.Tests.Windows runs only on Windows: never «dotnet test» on the solution or without a project.
|
||||
foreach (var name in new[] { "verifica.yml", "rilascio.yml" })
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user