File: meson.build

package info (click to toggle)
squeekboard 1.43.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,284 kB
  • sloc: ansic: 2,730; xml: 1,247; python: 296; sh: 48; makefile: 10
file content (155 lines) | stat: -rw-r--r-- 3,842 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
if get_option('tests')

test_env = [
  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
  'G_DEBUG=gc-friendly,fatal-warnings',
  'GSETTINGS_BACKEND=memory',
  'MALLOC_CHECK_=2'
]

test_cflags = [
  '-I@0@/../src'.format(meson.current_source_dir()),
  '-I@0@/../src'.format(meson.current_build_dir()),
  '-DEEK_COMPILATION',
  '-DEEKBOARD_COMPILATION'
]

test_link_args = [
  '-fPIC',
]

c_tests = [
]

foreach name : c_tests

    test_sources = [name + '.c']

    t = executable(
        name,
        test_sources,
        squeekboard_resources,
        link_with: libsqueekboard,
        c_args : test_cflags,
        link_args: test_link_args,
        dependencies: deps,       # from src/meson.build
        include_directories: [
            include_directories('..'),
            include_directories('../eek')
        ]
    )

    test(name, t, env: test_env)

endforeach

# The layout test is in the examples directory
# due to the way Cargo builds executables
# and the need to call it manually.

# This is the list of tested builtin layouts.
# Please keep each block alphabetical!
# Please keep shapes (with _) on the same line,
# variants (with +) on separate lines.
foreach layout : [
    # This is the fallback layout,
    # so stays first to make sure it never goes missing.
    'us', 'us_wide',

    # Block: Languages
    'am', 'am_wide',
    'am+phonetic', 'am+phonetic_wide',
    'ara', 'ara_wide',
    'be', 'be_wide',
    'bg', 'bg_wide',
    'bg+phonetic', 'bg+phonetic_wide',
    'br', 'br_wide',
    'by', 'by_wide',
    'ca', 'ca_wide',
    'ch+fr', 'ch+fr_wide',
    'ch+de', 'ch+de_wide',
    'ch', 'ch_wide',
    'cz', 'cz_wide',
    'cz+qwerty', 'cz+qwerty_wide',
    'de', 'de_wide',
    'de+bone', 'de+bone_wide',
    'de+neo', 'de+neo_wide',
    'dk', 'dk_wide',
    'epo', 'epo_wide',
    'es', 'es_wide',
    'es+cat', 'es+cat_wide',
    'fi', 'fi_wide',
    'fr', 'fr_wide',
    'fr+bepo', 'fr+bepo_wide',
    'ge', 'ge_wide',
    'gr', 'gr_wide',
    'gr+polytonic', 'gr+polytonic_wide',
    'hu', 'hu_wide',
    'il', 'il_wide',
    'in+mal', 'in+mal_wide',
    'ir', 'ir_wide',
    'it', 'it_wide',
    'it+fur', 'it+fur_wide',
    'jp','jp_wide',
    'jp+kana','jp+kana_wide',
    'no', 'no_wide',
    'pt', 'pt_wide',
    'pl', 'pl_wide',
    'ro', 'ro_wide',
    'rs', 'rs_wide',
    'rs+latin', 'rs+latin_wide',
    'rs+latinunicode', 'rs+latinunicode_wide',
    'ru', 'ru_wide',
    'se', 'se_wide',
    'si', 'si_wide',
    'th', 'th_wide',
    'tr', 'tr_wide',
    'tr+f', 'tr+f_wide',
    'ua', 'ua_wide',
    'us+colemak', 'us+colemak_wide',
    'us+dvorak', 'us+dvorak_wide',

    # Terminal keyboards
    'terminal/de', 'terminal/de_wide',
    'terminal/es', 'terminal/es_wide',
    'terminal/fr', 'terminal/fr_wide',
    'terminal/fr+bepo', 'terminal/fr+bepo_wide',
    'terminal/us', 'terminal/us_wide',
    'terminal/us+dvorak', 'terminal/us+dvorak_wide',
    
    # Block: Not languages.
    'emoji/us', 'emoji/us_wide',
    'number/us', 'number/us_wide',
    'pin/us', 'pin/us_wide',
]
    extra = []
    if layout.startswith('emoji/')
        extra += ['allow_missing_return']
    endif
    
    timeout = 30

    test(
        'test_layout_' + layout,
        cargo_script,
        args: ['run'] + cargo_build_flags
            + ['--example', 'test_layout', '--', layout]
            + extra,
        timeout: timeout,
        workdir: meson.project_build_root(),
    )
endforeach

endif

if get_option('find_orphans')
    test('test_find_orphans',
        cargo_script,
        args: ['run'] + cargo_build_flags
            + ['--example', 'find_orphan_layouts',
                '--', meson.project_source_root() + '/data/keyboards/'],
        timeout: timeout,
        workdir: meson.project_build_root(),
    )
endif