public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Akira TAGOH <akira@tagoh.org>
To: git-commits@fedoraproject.org
Subject: [tests/fonts] rhel9: lang_coverage: Add FONT_LANG_EXCLUDE_FILES to skip some bogus font files
Date: Thu, 13 Aug 2026 10:29:12 GMT	[thread overview]
Message-ID: <178661695258.1.6849281917267613084.tests-fonts-e739c7e37697@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : tests/fonts
Branch : rhel9
Commit : e739c7e37697c50fefef0fe8bfef12460f646dcb
Author : Akira TAGOH <akira@tagoh.org>
Date   : 2024-06-26T17:19:07+09:00
Stats  : +16/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/tests/fonts/c/e739c7e37697c50fefef0fe8bfef12460f646dcb?branch=rhel9

Log:
lang_coverage: Add FONT_LANG_EXCLUDE_FILES to skip some bogus font files

---
diff --git a/README.rst b/README.rst
index 80f4fda..380c718 100644
--- a/README.rst
+++ b/README.rst
@@ -96,6 +96,9 @@ Available test cases
 
   - PACKAGE
   - FONT_LANG (optional)
+  - FONT_LANG_EXCLUDE_FILES (optional)
+
+    Set a regex to skip some bogus font files.
 
 - Validate family name
 

diff --git a/tests/lang_coverage/test.sh b/tests/lang_coverage/test.sh
index 62384ca..59c6320 100755
--- a/tests/lang_coverage/test.sh
+++ b/tests/lang_coverage/test.sh
@@ -3,6 +3,7 @@
 . /usr/share/beakerlib/beakerlib.sh || exit 1
 
 FONT_LANG=${FONT_LANG:-"en"}
+FONT_LANG_EXCLUDE_FILES=${FONT_LANG_EXCLUDE_FILES:-}
 PACKAGE=${PACKAGE:-"blahblah-fonts"}
 
 function get_font_path() {
@@ -13,12 +14,21 @@ function get_font_path() {
     echo -n $ret
 }
 
+function check_exception() {
+    if [ "x$FONT_LANG_EXCLUDE_FILES" == "x" ]; then
+        echo -n 1
+    else
+        echo $1 | grep -E "$FONT_LANG_EXCLUDE_FILES" 2>&1 > /dev/null
+        echo -n $?
+    fi
+}
+
 function check_lang_coverage() {
     ret=0
     for p in $(get_font_path); do
         for f in $(find $p -regex '.*/*\.\(t1\)?\(ttf\)?\(otf\)?\(ttc\)?\(otc\)?\(pcf.*\)?\(pfa\)?'); do
             set -f
-            if test -f $f; then
+	    if [ $(check_exception $f) -ne 0 -a -f $f ]; then
                 IFS=, read -ra langlist <<< "$FONT_LANG"
                 for l in "${langlist[@]}"; do
                     res=$(fc-validate -l $l $f || :)
@@ -29,6 +39,8 @@ function check_lang_coverage() {
                         echo $res
                     fi
                 done
+            else
+                rlLogInfo "Skipping $f"
             fi
             set +f
         done

                 reply	other threads:[~2026-08-13 10:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178661695258.1.6849281917267613084.tests-fonts-e739c7e37697@fedoraproject.org \
    --to=akira@tagoh.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox