@@ -1,25 +1,30 | |||||
1 |
|
1 | |||
2 | tests_inc = include_directories(['GUITestUtils']) |
|
2 | tests_inc = include_directories(['GUITestUtils']) | |
3 |
|
3 | |||
4 | tests = [ |
|
4 | tests = [ | |
5 | { |
|
5 | { | |
6 | 'name':'simple_graph', |
|
6 | 'name':'simple_graph', | |
7 | 'sources': ['simple_graph/main.cpp'], |
|
7 | 'sources': ['simple_graph/main.cpp'], | |
8 | 'deps': [sciqlop_gui, qt5test, TestUtils_dep] |
|
8 | 'deps': [sciqlop_gui, qt5test, TestUtils_dep] | |
9 | }, |
|
9 | }, | |
10 | { |
|
10 | { | |
11 | 'name':'multiple_sync_graph', |
|
11 | 'name':'multiple_sync_graph', | |
12 | 'sources': ['multiple_sync_graph/main.cpp'], |
|
12 | 'sources': ['multiple_sync_graph/main.cpp'], | |
13 | 'deps': [sciqlop_gui, qt5test, TestUtils_dep] |
|
13 | 'deps': [sciqlop_gui, qt5test, TestUtils_dep] | |
14 | } |
|
14 | } | |
15 | ] |
|
15 | ] | |
16 |
|
16 | |||
17 | foreach unit_test : tests |
|
17 | foreach unit_test : tests | |
18 | test_moc_files = qt5.preprocess(moc_sources : unit_test['sources']) |
|
18 | test_moc_files = qt5.preprocess(moc_sources : unit_test['sources']) | |
19 | test_exe = executable(unit_test['name'],unit_test['sources'] , test_moc_files, |
|
19 | test_exe = executable(unit_test['name'],unit_test['sources'] , test_moc_files, | |
20 | dependencies : unit_test['deps'], |
|
20 | dependencies : unit_test['deps'], | |
21 | include_directories: tests_inc, |
|
21 | include_directories: tests_inc, | |
22 | cpp_args : ['-DCORE_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/../tests-resources"'] |
|
22 | cpp_args : ['-DCORE_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/../tests-resources"'] | |
23 | ) |
|
23 | ) | |
24 | test('Test-' + unit_test['name'], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test['name'])]) |
|
24 | if get_option('teamcity') | |
|
25 | test_exe_args = ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test['name'])] | |||
|
26 | else | |||
|
27 | test_exe_args = [] | |||
|
28 | endif | |||
|
29 | test('Test-' + unit_test['name'], test_exe, args: test_exe_args) | |||
25 | endforeach |
|
30 | endforeach |
@@ -1,1 +1,2 | |||||
1 | option('biuld_gui_tests', type : 'boolean', value : true, description : 'Build GUI tests.') |
|
1 | option('biuld_gui_tests', type : 'boolean', value : true, description : 'Build GUI tests.') | |
|
2 | option('teamcity', type : 'boolean', value : false, description : 'Enables TeamCity output format for tests.') |
General Comments 0
You need to be logged in to leave comments.
Login now