#335 Update check_default_fonts to match the new test case
Merged a month ago by adamwill. Opened 2 months ago by adamwill.

@@ -0,0 +1,16 @@ 

+ {

+   "area": [

+     {

+       "width": 18,

+       "type": "match",

+       "height": 18,

+       "ypos": 8,

+       "xpos": 119

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "gnome_layout_us",

+     "gnome_layout_ascii"

+   ]

+ } 

\ No newline at end of file

file modified
+17 -43
@@ -3,11 +3,21 @@ 

  use testapi;

  use utils;

  

- # This test cases automates the Testcase_i18n_default_fonts, see

- # https://fedoraproject.org/wiki/QA:Testcase_i18n_default_fonts.

+ # This test cases automates Testcase_default_font_installation, see

+ # https://fedoraproject.org/wiki/QA:Testcase_default_font_installation

  

  sub run {

      my $self = shift;

+     my $language = get_var("LANGUAGE");

+     my @supported = qw(japanese arabic);

+     return unless ($language ~~ @supported);

+     # we need to install the check tool

+     $self->root_console(tty => 3);

+     script_run("loadkeys us");

+     assert_script_run("dnf -y install fontquery");

+     # and give the user tty perms for later

+     assert_script_run("chmod 666 /dev/${serialdev}");

+     desktop_vt;

  

      # On the console, the fonts might differ than in GUI.

      # We will perform the tests in the gnome-terminal.
@@ -25,47 +35,11 @@ 

      assert_screen("apps_run_terminal");

      wait_still_screen(stilltime => 5, similarity_level => 42);

  

-     # Run the test commands and record their output in the test file.

-     enter_cmd("fc-match sans > test.txt");

-     sleep(2);

-     enter_cmd("fc-match serif >> test.txt");

-     sleep(2);

-     enter_cmd("fc-match monospace >> test.txt");

-     sleep(2);

- 

-     # Depending on the selected language (Japanese or Arabic), we

-     # will download a reference file and compare it with the test

-     # file obtained in the previous step.

- 

-     my $language = get_var("LANGUAGE");

-     my @supported = qw(japanese arabic);

-     # If the language is among supported languages

-     if ($language ~~ @supported) {

-         # Go to root console for script assertions.

-         $self->root_console(tty => 3);

-         # Load us keys to be used on console

-         script_run("loadkeys us");

-         # Navigate to the home directory.

-         my $username = get_var("USER_LOGIN") // "test";

-         script_run("cd /home/$username/");

-         # Download the language reference file.

-         script_run("wget https://fedorapeople.org/groups/qa/openqa-fonts/$language-reference.txt");

-         # upload the log for debugging.

-         upload_logs "test.txt", failok => 1;

-         # Compare the test file and the reference file.

-         # We have been having a lot of failures on the Install Arabic test because of this

-         # part, which is actually testing an optional test. Unfortunately, it is still

-         # not clear what the current situation on Fedora should be and this will need

-         # more investigation.

-         # For now, let us softfail instead of fail until we know for sure how what the outcome

-         # should be.

-         my $exit = script_run("diff -u test.txt $language-reference.txt", timeout => 15);

-         if ($exit != 0) {

-             record_soft_failure("The default fonts differ from what is expected, see RBZ#2093080.");

-         }

-     }

- 

-     # For the rest of languages that are not currently defined, do nothing.

+     # Run the test command

+     my %codes = ("japanese" => "ja", "arabic" => "ar");

+     my $code = $codes{$language};

+     my $release = lc(get_var("VERSION"));

+     assert_script_run("fontquery-diff -l ${code} ${release}", 300);

  }

  

  sub test_flags {

The test case was completely changed earlier this year. Per
https://bugzilla.redhat.com/show_bug.cgi?id=2093080#c17 , atagoh
wants us to use the new test case for validation and have openQA
automate it, so, this does that. I already updated the matrix
earlier in the year, I will update fedora_openqa when this is
merged.

Signed-off-by: Adam Williamson awilliam@redhat.com

rebased onto d515ad1

2 months ago

This is failing because it's running out of disk space. I kinda suspect fontquery's container build setup might be making the images too big, so I don't want to just kick up the disk size. I'll look into it more later. CC @tagoh

Yeah, this seems...larger than it ought to be?

[adamw@xps13a relval (main %)]$ podman image ls | grep fontquery
ghcr.io/fedora-i18n/fontquery/fedora/minimal  rawhide               0019402f7363  30 hours ago   5.03 GB

The history of the image looks like it has way more layers than it needs, like it's getting iterated on every day, rather than being built from scratch every day:

          "History": [
               {
                    "created": "2024-06-23T07:37:35.093132426Z",
                    "created_by": "KIWI 10.0.21",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>"
               },
               {
                    "created": "2024-06-24T06:04:31.652639116Z",
                    "created_by": "/bin/sh -c #(nop) ARG release=rawhide",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.652656008Z",
                    "created_by": "/bin/sh -c #(nop) ARG release=rawhide setup=fontquery-setup.sh",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.652665015Z",
                    "created_by": "/bin/sh -c #(nop) ARG dist= release=rawhide setup=fontquery-setup.sh",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.652683149Z",
                    "created_by": "/bin/sh -c #(nop) ENV NAME=fontquery/fedora/base",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.652703106Z",
                    "created_by": "/bin/sh -c #(nop) ENV RELEASE=${release}",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.652724406Z",
                    "created_by": "/bin/sh -c #(nop) ENV DIST=${dist}",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.652822709Z",
                    "created_by": "/bin/sh -c #(nop) LABEL org.opencontainers.image.ref.name=\"$NAME\"       org.opencontainers.image.version=\"$RELEASE\"       org.opencontainers.image.source=https://github.com/fedora-i18n/fontquery       org.opencontainers.image.description=\"Base image based on Fedora for fontquery\"       org.opencontainers.image.licenses=\"MIT\"",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.758384454Z",
                    "created_by": "/bin/sh -c #(nop) COPY file:4633a6f8167492834054e835ba7f703ef408625ba576076485c9a6486a94a385 in /usr/local/bin/fontquery-setup.sh ",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:31.889703824Z",
                    "created_by": "/bin/sh -c #(nop) COPY multi:7b8216ef7e3ff1fe5894761d2d66678fa53bc3a021ba7f1801a9ce1da2ea9a25 in /tmp ",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:04:59.972815891Z",
                    "created_by": "|3 dist= release=rawhide setup=fontquery-setup.sh /bin/sh -c echo \"* Setup base image\"; /usr/local/bin/fontquery-setup.sh -t base",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM quay.io/fedora/fedora:rawhide"
               },
               {
                    "created": "2024-06-24T06:05:08.26207215Z",
                    "created_by": "/bin/sh -c #(nop) ARG release=rawhide",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:05:08.262098599Z",
                    "created_by": "/bin/sh -c #(nop) ENV RELEASE ${release}",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:05:08.262120039Z",
                    "created_by": "/bin/sh -c #(nop) LABEL description=\"Working environment for fontquery - minimal\"",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:05:20.985387151Z",
                    "created_by": "|1 release=rawhide /bin/sh -c echo \"* Installing default fonts packages\"; fontquery-setup.sh -t minimal",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:05:20.985426765Z",
                    "created_by": "/bin/sh -c #(nop) CMD [\"/usr/local/bin/fontquery-client\", \"--pattern\", \"minimal\"]",
                    "empty_layer": true
               },
               {
                    "created": "2024-06-24T06:05:21.63825381Z",
                    "created_by": "/bin/sh -c #(nop) ENTRYPOINT [\"/usr/local/bin/fontquery-client\", \"--pattern\", \"minimal\"]",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>"
               },
               {
                    "created": "2024-06-25T00:52:24.96424751Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-06-26T00:51:57.640684027Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-06-27T00:52:43.0834061Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-06-30T00:56:50.535142188Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-03T00:53:04.408176937Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-05T00:52:34.047112169Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-06T00:51:38.091876925Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-08T00:54:27.428943572Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-09T00:53:09.178772562Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-10T00:54:10.520575405Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-12T00:53:44.706108375Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-13T00:54:09.566439518Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-14T00:58:18.626171793Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-17T00:54:41.599737685Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-21T00:58:06.902184395Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-22T00:57:41.847144132Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-25T00:56:08.187571209Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-26T00:54:33.854019066Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-27T00:53:59.229425912Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-28T00:58:54.414571661Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-07-31T00:44:40.206527279Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-08-01T00:59:46.364948624Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               },
               {
                    "created": "2024-08-02T00:55:05.60680604Z",
                    "created_by": "/bin/sh",
                    "author": "Fedora Project Contributors <devel@lists.fedoraproject.org>",
                    "comment": "FROM ghcr.io/fedora-i18n/fontquery/fedora/minimal:rawhide"
               }
          ],

rebased onto 8d6328b

a month ago

Pull-Request has been merged by adamwill

a month ago