elementary: always use a font that matches our expectation for our test instead of the system one.

Summary:
Our tests do rely on the font to have certain characteristic so that they have the value and the
item size being calculated is the one we expect. As it is quite hard to support an infinite number
of font with random size, it is easier to embed one we can rely on for our test. I have copied Vera
from Expedite and changed evas global font path to look for it first. After this patch, even with an
incompatible font in the system, it does still pass all tests. This add around 400KB of data to our
git, but is necessary for a reliable tests suite.

@fix

T8277

Reviewers: lauromoura, zmike, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8277

Differential Revision: https://phab.enlightenment.org/D10276
devs/bu5hm4n/dead_events
Cedric BAIL 3 years ago committed by Lauro Moura
parent 914135a6db
commit b6c76c78b8
  1. BIN
      src/tests/elementary/fonts/Vera.ttf
  2. BIN
      src/tests/elementary/fonts/VeraBI.ttf
  3. BIN
      src/tests/elementary/fonts/VeraBd.ttf
  4. BIN
      src/tests/elementary/fonts/VeraIt.ttf
  5. BIN
      src/tests/elementary/fonts/VeraSe.ttf
  6. BIN
      src/tests/elementary/fonts/VeraSeBd.ttf
  7. 7
      src/tests/elementary/fonts/fonts.alias
  8. 31
      src/tests/elementary/fonts/fonts.dir
  9. 13
      src/tests/elementary/suite_helpers.c

@ -0,0 +1,7 @@
Vera-Bold-Italic -Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-ascii-0
Vera-Normal -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-ascii-0
Vera-Bold -Bitstream-Bitstream Vera Sans-bold-r-normal--0-0-0-0-p-0-ascii-0
Vera-Italic -Bitstream-Bitstream Vera Sans-medium-i-normal--0-0-0-0-p-0-ascii-0
Vera-Serif -Bitstream-Bitstream Vera Serif-medium-r-normal--0-0-0-0-p-0-ascii-0
Vera-Serif-Bold -Bitstream-Bitstream Vera Serif-bold-r-normal--0-0-0-0-p-0-ascii-0
Vera -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-ascii-0

@ -0,0 +1,31 @@
30
VeraBI.ttf -Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-ascii-0
VeraBI.ttf -Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-fcd8859-15
VeraBI.ttf -Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-iso8859-1
VeraBI.ttf -Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-iso8859-15
VeraBI.ttf -Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-iso8859-9
Vera.ttf -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-ascii-0
Vera.ttf -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-fcd8859-15
Vera.ttf -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-iso8859-1
Vera.ttf -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-iso8859-15
Vera.ttf -Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-iso8859-9
VeraBd.ttf -Bitstream-Bitstream Vera Sans-bold-r-normal--0-0-0-0-p-0-ascii-0
VeraBd.ttf -Bitstream-Bitstream Vera Sans-bold-r-normal--0-0-0-0-p-0-fcd8859-15
VeraBd.ttf -Bitstream-Bitstream Vera Sans-bold-r-normal--0-0-0-0-p-0-iso8859-1
VeraBd.ttf -Bitstream-Bitstream Vera Sans-bold-r-normal--0-0-0-0-p-0-iso8859-15
VeraBd.ttf -Bitstream-Bitstream Vera Sans-bold-r-normal--0-0-0-0-p-0-iso8859-9
VeraIt.ttf -Bitstream-Bitstream Vera Sans-medium-i-normal--0-0-0-0-p-0-ascii-0
VeraIt.ttf -Bitstream-Bitstream Vera Sans-medium-i-normal--0-0-0-0-p-0-fcd8859-15
VeraIt.ttf -Bitstream-Bitstream Vera Sans-medium-i-normal--0-0-0-0-p-0-iso8859-1
VeraIt.ttf -Bitstream-Bitstream Vera Sans-medium-i-normal--0-0-0-0-p-0-iso8859-15
VeraIt.ttf -Bitstream-Bitstream Vera Sans-medium-i-normal--0-0-0-0-p-0-iso8859-9
VeraSe.ttf -Bitstream-Bitstream Vera Serif-medium-r-normal--0-0-0-0-p-0-ascii-0
VeraSe.ttf -Bitstream-Bitstream Vera Serif-medium-r-normal--0-0-0-0-p-0-fcd8859-15
VeraSe.ttf -Bitstream-Bitstream Vera Serif-medium-r-normal--0-0-0-0-p-0-iso8859-1
VeraSe.ttf -Bitstream-Bitstream Vera Serif-medium-r-normal--0-0-0-0-p-0-iso8859-15
VeraSe.ttf -Bitstream-Bitstream Vera Serif-medium-r-normal--0-0-0-0-p-0-iso8859-9
VeraSeBd.ttf -Bitstream-Bitstream Vera Serif-bold-r-normal--0-0-0-0-p-0-ascii-0
VeraSeBd.ttf -Bitstream-Bitstream Vera Serif-bold-r-normal--0-0-0-0-p-0-fcd8859-15
VeraSeBd.ttf -Bitstream-Bitstream Vera Serif-bold-r-normal--0-0-0-0-p-0-iso8859-1
VeraSeBd.ttf -Bitstream-Bitstream Vera Serif-bold-r-normal--0-0-0-0-p-0-iso8859-15
VeraSeBd.ttf -Bitstream-Bitstream Vera Serif-bold-r-normal--0-0-0-0-p-0-iso8859-9

@ -193,7 +193,7 @@ _ui_win_visibility_change(void *data EINA_UNUSED, const Efl_Event *ev)
EFL_CLASS_SIMPLE_CLASS(efl_loop, "Efl.Loop", EFL_LOOP_CLASS)
static Evas_Object *
_elm_suite_win_create()
_elm_suite_win_create(void)
{
Evas_Object *win;
Eo *loop, *timer;
@ -225,9 +225,18 @@ _elm_suite_win_create()
return win;
}
#define TEST_FONT_DIR TESTS_SRC_DIR "/fonts/"
Evas_Object *
win_add()
win_add(void)
{
static Eina_Bool font_path = EINA_FALSE;
if (!font_path)
{
evas_font_path_global_append(TEST_FONT_DIR);
font_path = EINA_TRUE;
}
if (getpid() != main_pid)
{
if (global_win) return global_win;

Loading…
Cancel
Save