CI e installatore: commenti degli script in inglese (#43)

La regola del progetto è «codice e commenti in inglese; interfaccia, documenti
e messaggi in italiano», e gli script di .gitea/ (script e flussi), di
installer/ e docker/entrypoint.sh avevano ancora i commenti in italiano
(decisione di Alberto del 29 novembre 2026). Cambiano solo i commenti: i
messaggi che una persona legge (echo, ::warning::, ::error::, nomi dei passi,
note della release) restano in italiano e nessun comando cambia. I programmi
awk e gli script finti delle prove erano già in inglese.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-29 12:03:13 +01:00
1 parent f48384b7d4
commit 009e7d6710
18 files changed
+496 -495

No files matched your search

+15 -15
View File
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
# Riepilogo dei risultati delle prove (file .trx di «dotnet test --logger trx»): superate, fallite e saltate per ogni
# file, i nomi delle fallite e i motivi delle saltate. Lo scrive nel registro e, se il runner lo offre, nel riepilogo
# del lavoro (GITHUB_STEP_SUMMARY). Nessun corpo di risposta né dato personale: solo nomi di prove e messaggi.
# Summary of the test results (.trx files of «dotnet test --logger trx»): passed, failed and skipped for each file,
# the names of the failed ones and the reasons of the skipped ones. It writes it to the log and, if the runner offers
# it, to the job summary (GITHUB_STEP_SUMMARY). No response body nor personal data: only test names and messages.
#
# .gitea/scripts/riepilogo-prove.sh <cartella dei .trx> [saltate ammesse]
#
# Esce con 1 se una prova è fallita, se le saltate sono più di quelle ammesse (predefinito 0: nella CI ci sono
# Chromium e Xvfb, quindi nessuna prova ha motivo di saltarsi) o se non c'è nessun risultato. Fa eccezione solo la
# categoria «da fare»: le inconclusive di FeaturesStillToDo (flussi di conformità H.264 delle parti che il
# decodificatore non gestisce ancora) il cui motivo comincia con «da fare: » si elencano e non contano fra le saltate.
# Qualunque altra inconclusiva, anche con «da fare: » nel messaggio, è una saltata.
# Exits with 1 if a test failed, if the skipped ones are more than those allowed (default 0: the CI has Chromium and
# Xvfb, so no test has a reason to be skipped) or if there is no result at all. The only exception is the «da fare»
# category: the inconclusive results of FeaturesStillToDo (H.264 conformance streams for the parts the decoder does
# not handle yet) whose reason starts with «da fare: » are listed and do not count among the skipped ones.
# Any other inconclusive result, even with «da fare: » in its message, is a skipped one.
set -euo pipefail
cartella="${1:?Indica la cartella con i file .trx.}"
@@ -29,10 +29,10 @@ trap 'rm -f "$riepilogo"' EXIT
fallite_totali=0
saltate_totali=0
dafare_totali=0
# «Da fare»: una inconclusiva di FeaturesStillToDo il cui motivo comincia con «da fare: » subito dopo la cornice di MSTest
# («Assert.Inconclusive. », «Assert.Inconclusive failed. », «Assert.Inconclusive non riuscito. »): segna una parte non
# ancora scritta, non un ambiente rotto, e si conta a parte. Il nome della prova e l'inizio del motivo sono entrambi
# vincolati: nessun'altra prova può saltarsi in silenzio scrivendo «da fare: » nel messaggio.
# «Da fare»: an inconclusive result of FeaturesStillToDo whose reason starts with «da fare: » right after the MSTest
# frame («Assert.Inconclusive. », «Assert.Inconclusive failed. », «Assert.Inconclusive non riuscito. »): it marks a part
# not written yet, not a broken environment, and is counted apart. Both the test name and the start of the reason are
# constrained: no other test can skip silently by writing «da fare: » in its message.
da_fare='$1 != "Passed" && $1 != "Failed" && $1 != "Error" && $1 != "Timeout" && $1 != "Aborted" && $2 ~ /^FeaturesStillToDo( |\(|$)/ && $3 ~ /^Assert\.Inconclusive[^.]*\. *da fare: /'
{
echo "### Prove"
@@ -43,7 +43,7 @@ da_fare='$1 != "Passed" && $1 != "Failed" && $1 != "Error" && $1 != "Timeout" &&
for trx in "${file[@]}"; do
nome="$(basename "$trx")"
# Un risultato per riga (i .trx sono XML su più righe), poi nome, esito e primo messaggio di ciascuno.
# One result per line (the .trx files are XML over several lines), then name, outcome and first message of each.
righe="$(tr '\r\n' ' ' < "$trx" | sed 's/<UnitTestResult /\n<UnitTestResult /g' | awk '
function attributo(testo, chiave, inizio) {
if (match(testo, chiave "=\"[^\"]*\"")) {
@@ -83,14 +83,14 @@ for trx in "${file[@]}"; do
if (( fallite > 0 )); then
echo " Fallite:"
# Le righe in più si leggono e si scartano (niente «head»: con pipefail il SIGPIPE fermerebbe lo script).
# The extra lines are read and discarded (no «head»: with pipefail the SIGPIPE would stop the script).
printf '%s\n' "$righe" | awk -F'\t' '$1 == "Failed" || $1 == "Error" || $1 == "Timeout" || $1 == "Aborted" {
if (++n > 50) next; m = $3; if (length(m) > 300) m = substr(m, 1, 300) "…"; print " - " $2 ": " m }'
fi
if (( saltate > 0 )); then
echo " Saltate, per motivo:"
# Il motivo senza la cornice di MSTest («Il metodo … ha generato un'eccezione. Assert.Inconclusive.»).
# The reason without the MSTest frame («Il metodo … ha generato un'eccezione. Assert.Inconclusive.»).
printf '%s\n' "$righe" | awk -F'\t' "!($da_fare)"' && $1 != "Passed" && $1 != "Failed" && $1 != "Error" && $1 != "Timeout" && $1 != "Aborted" {
m = $3; sub(/^.*Assert\.Inconclusive\. */, "", m); if (m == "") m = "(nessun motivo)"; print m }' \
| sort | uniq -c | sort -rn | awk 'NR <= 30 { sub(/^ */, " "); print }'