Skip to content

Commit 36ee91e

Browse files
committed
tests: isolate QML font configuration
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent d53f943 commit 36ee91e

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎.github/workflows/scripts/run-qml-tests.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ if [[ -n "${QML_TEST_IMPORT_PATH:-}" ]]; then
1515
qml_import_arguments=(-import "$QML_TEST_IMPORT_PATH")
1616
fi
1717

18+
if [[ -n "${QML_TEST_FONTCONFIG_FILE:-}" ]]; then
19+
export FONTCONFIG_FILE="$QML_TEST_FONTCONFIG_FILE"
20+
fi
21+
1822
if ((${#test_directories[@]} == 0)); then
1923
printf 'No QML tests were found\n'
2024
exit 0

‎devenv.nix‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
{
77
packages = [ pkgs.qt6.qtdeclarative ];
8+
env.QML_TEST_FONTCONFIG_FILE = pkgs.writeText "qml-test-fonts.conf" ''
9+
<?xml version="1.0"?>
10+
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
11+
<fontconfig>
12+
<dir>${pkgs.dejavu_fonts}/share/fonts/truetype</dir>
13+
<cachedir prefix="xdg">fontconfig</cachedir>
14+
</fontconfig>
15+
'';
816
env.QML_TEST_IMPORT_PATH = "${pkgs.qt6.qtdeclarative}/lib/qt-6/qml";
917

1018
# https://devenv.sh/git-hooks/

0 commit comments

Comments
 (0)