Add PO file update check to tests

The PO file updates can now run in a normal test, eliminating the need for
special handling.

Rename the `check-translations.fish` script, to clarify which part of the checks
happens in it.
This commit is contained in:
Daniel Rainer
2025-06-11 18:03:13 +02:00
parent 85fb937a4d
commit 80131acff2
3 changed files with 30 additions and 3 deletions

View File

@@ -2,17 +2,25 @@
set -ex
cleanup () {
if [ -n "$template_file" ] && [ -e "$template_file" ]; then
rm "$template_file"
fi
}
trap cleanup EXIT INT TERM HUP
RUSTFLAGS='-D warnings'; export RUSTFLAGS
RUSTDOCFLAGS='-D warnings'; export RUSTDOCFLAGS
repo_root="$(dirname "$0")/.."
build_dir="$repo_root/target/debug"
cargo build --workspace --all-targets
template_file=$(mktemp)
FISH_GETTEXT_EXTRACTION_FILE=$template_file cargo build --workspace --all-targets
PATH="$build_dir:$PATH" "$repo_root/build_tools/style.fish" --all --check
cargo clippy --workspace --all-targets
cargo test --no-default-features --workspace --all-targets
cargo test --doc --workspace
cargo doc --workspace
"$repo_root/tests/test_driver.py" "$build_dir"
FISH_GETTEXT_EXTRACTION_FILE=$template_file "$repo_root/tests/test_driver.py" "$build_dir"