Debian Codegraph @

tests/meson.build

raw
1 python_module = import('python')
2 python = python_module.find_installation('python3', required: false, modules: ['pytest'])
3
4 if not python.found()
5 subdir_done()
6 endif
7
8 test_env = environment()
9 test_env.prepend('PYTHONPATH', meson.project_source_root() / 'src')
10
11 unit_tests = [
12 'unit_tests/test_action_presenter.py',
13 'unit_tests/test_ax_action.py',
14 'unit_tests/test_ax_collection.py',
15 'unit_tests/test_ax_component.py',
16 'unit_tests/test_ax_document.py',
17 'unit_tests/test_ax_event_synthesizer.py',
18 'unit_tests/test_ax_hypertext.py',
19 'unit_tests/test_ax_object.py',
20 'unit_tests/test_ax_selection.py',
21 'unit_tests/test_ax_table.py',
22 'unit_tests/test_ax_text.py',
23 'unit_tests/test_ax_utilities.py',
24 'unit_tests/test_ax_utilities_action.py',
25 'unit_tests/test_ax_utilities_component.py',
26 'unit_tests/test_ax_utilities_application.py',
27 'unit_tests/test_ax_utilities_debugging.py',
28 'unit_tests/test_ax_utilities_event.py',
29 'unit_tests/test_ax_utilities_object.py',
30 'unit_tests/test_ax_utilities_relation.py',
31 'unit_tests/test_ax_utilities_role.py',
32 'unit_tests/test_ax_utilities_state.py',
33 'unit_tests/test_ax_value.py',
34 'unit_tests/test_braille.py',
35 'unit_tests/test_braille_presenter.py',
36 'unit_tests/test_bypass_mode_manager.py',
37 'unit_tests/test_caret_navigator.py',
38 'unit_tests/test_chat_presenter.py',
39 'unit_tests/test_command_manager.py',
40 'unit_tests/test_command_registry.py',
41 'unit_tests/test_dbus_service.py',
42 'unit_tests/test_debugging_tools_manager.py',
43 'unit_tests/test_document_presenter.py',
44 'unit_tests/test_event_manager.py',
45 'unit_tests/test_flat_review_presenter.py',
46 'unit_tests/test_focus_manager.py',
47 'unit_tests/test_gsettings_registry.py',
48 'unit_tests/test_input_event_manager.py',
49 'unit_tests/test_keybindings.py',
50 'unit_tests/test_learn_mode_presenter.py',
51 'unit_tests/test_live_region_presenter.py',
52 'unit_tests/test_notification_presenter.py',
53 'unit_tests/test_object_navigator.py',
54 'unit_tests/test_orca_modifier_manager.py',
55 'unit_tests/test_preferences_grid_base.py',
56 'unit_tests/test_presentation_manager.py',
57 'unit_tests/test_pronunciation_dictionary_manager.py',
58 'unit_tests/test_profile_manager.py',
59 'unit_tests/test_say_all_presenter.py',
60 'unit_tests/test_script_manager.py',
61 'unit_tests/test_sleep_mode_manager.py',
62 'unit_tests/test_sound_presenter.py',
63 'unit_tests/test_speech_manager.py',
64 'unit_tests/test_speech_presenter.py',
65 'unit_tests/test_spellcheck_presenter.py',
66 'unit_tests/test_structural_navigator.py',
67 'unit_tests/test_system_information_presenter.py',
68 'unit_tests/test_typing_echo_presenter.py',
69 'unit_tests/test_table_navigator.py',
70 'unit_tests/test_text_attribute_manager.py',
71 'unit_tests/test_where_am_i_presenter.py',
72 ]
73
74 foreach test_file : unit_tests
75 test_name = test_file.split('/')[-1].split('.')[0]
76 test(
77 test_name,
78 python,
79 args: ['-m', 'pytest', files(test_file), '-v'],
80 env: test_env,
81 suite: 'unit',
82 timeout: 30,
83 )
84 endforeach
85
86 dbus_integration_tests = [
87 'integration_tests/test_dbus_with_orca.py',
88 ]
89
90 integration_wrapper = configure_file(
91 input: 'integration_test_wrapper.py.in',
92 output: 'integration_test_wrapper.py',
93 configuration: {
94 'PYTHON': python.full_path(),
95 },
96 )
97
98 foreach test_file : dbus_integration_tests
99 test_name = test_file.split('/')[-1].split('.')[0]
100 test(
101 test_name,
102 integration_wrapper,
103 args: [files(test_file)],
104 env: test_env,
105 suite: 'integration',
106 timeout: 120,
107 )
108 endforeach
109
110 gsettings_integration_tests = [
111 'integration_tests/test_gsettings.py',
112 ]
113
114 foreach test_file : gsettings_integration_tests
115 test_name = test_file.split('/')[-1].split('.')[0]
116 test(
117 test_name,
118 python,
119 args: ['-m', 'pytest', files(test_file), '-v'],
120 env: test_env,
121 suite: 'integration',
122 timeout: 30,
123 )
124 endforeach