Blame tests/canary_tests.sh.in

Packit Service af52df
#!/bin/sh -e
Packit Service af52df
# Run the translation canary tests on the translatable strings
Packit Service af52df
Packit Service af52df
if [ @WITH_PYTHON3@ != 1 ]; then
Packit Service af52df
    echo "Cannot run translations tests without python3, skipping."
Packit Service af52df
    exit 0
Packit Service af52df
fi
Packit Service af52df
Packit Service af52df
DISTRO=`busctl get-property org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.hostname1 OperatingSystemCPEName | cut -d ":" -f 3`
Packit Service af52df
if [ $DISTRO == "centos" -o $DISTRO == "enterprise_linux" ]; then
Packit Service af52df
    echo "Cannot run translations tests on CentOS/RHEL 7, skipping."
Packit Service af52df
    exit 0
Packit Service af52df
fi
Packit Service af52df
Packit Service af52df
# If not run from automake, fake it
Packit Service af52df
if [ -z "$top_srcdir" ]; then
Packit Service af52df
    top_srcdir="$(dirname "$0")/.."
Packit Service af52df
fi
Packit Service af52df
Packit Service af52df
PYTHONPATH="${PYTHONPATH}:${top_srcdir}/translation-canary"
Packit Service af52df
export PYTHONPATH
Packit Service af52df
Packit Service af52df
# Run the translatable tests on the POT file
Packit Service 21d5e3
python3 -m translation_canary.translatable "${top_srcdir}/po/libbytesize.pot"