@@ -1,81 +1,87 | |||
|
1 | 1 | TestUtils = library('TestUtils', 'TestUtils/TestProviders.h', 'TestUtils/TestProviders.cpp', |
|
2 | 2 | dependencies : [sciqlop_core, qt5test] |
|
3 | 3 | ) |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | TestUtils_dep = declare_dependency(link_with : TestUtils, |
|
7 | 7 | include_directories: include_directories('TestUtils'), |
|
8 | 8 | dependencies : [sciqlop_core, qt5test]) |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | |
|
12 | 12 | tests = [ |
|
13 | 13 | { |
|
14 | 14 | 'name':'TestSyncGroup', |
|
15 | 15 | 'sources': ['Variable/TestSyncGroup.cpp'], |
|
16 | 16 | 'deps': [sciqlop_core, qt5test] |
|
17 | 17 | }, |
|
18 | 18 | { |
|
19 | 19 | 'name':'TestDateTimeRange', |
|
20 | 20 | 'sources': ['Data/TestDateTimeRange.cpp'], |
|
21 | 21 | 'deps': [sciqlop_core, qt5test] |
|
22 | 22 | }, |
|
23 | 23 | { |
|
24 | 24 | 'name':'TestDataSourceController', |
|
25 | 25 | 'sources': [ |
|
26 | 26 | 'DataSource/TestDataSourceController.cpp', |
|
27 | 27 | 'DataSource/DataSourceItemBuilder.cpp' |
|
28 | 28 | ], |
|
29 | 29 | 'deps': [sciqlop_core, qt5test] |
|
30 | 30 | }, |
|
31 | 31 | { |
|
32 | 32 | 'name':'TestDataSources', |
|
33 | 33 | 'sources': [ |
|
34 | 34 | 'DataSource/TestDataSources.cpp' |
|
35 | 35 | ], |
|
36 | 36 | 'deps': [sciqlop_core, qt5test, TestUtils_dep] |
|
37 | 37 | }, |
|
38 | 38 | { |
|
39 | 39 | 'name':'TestDataSourceItem', |
|
40 | 40 | 'sources': [ |
|
41 | 41 | 'DataSource/TestDataSourceItem.cpp', |
|
42 | 42 | 'DataSource/DataSourceItemBuilder.cpp' |
|
43 | 43 | ], |
|
44 | 44 | 'deps': [sciqlop_core, qt5test] |
|
45 | 45 | }, |
|
46 | 46 | { |
|
47 | 47 | 'name':'TestVariable', |
|
48 | 48 | 'sources': ['Variable/TestVariable.cpp'], |
|
49 | 49 | 'deps': [sciqlop_core, qt5test] |
|
50 | 50 | }, |
|
51 | 51 | { |
|
52 | 52 | 'name':'TestDownloader', |
|
53 | 53 | 'sources': ['Network/TestDownloader.cpp'], |
|
54 | 54 | 'deps': [sciqlop_core, qt5test, qt5Concurrent] |
|
55 | 55 | }, |
|
56 | 56 | { |
|
57 | 57 | 'name':'TestVariableController2', |
|
58 | 58 | 'sources': ['Variable/TestVariableController2.cpp'], |
|
59 | 59 | 'deps': [sciqlop_core, qt5test, qt5Concurrent, TestUtils_dep] |
|
60 | 60 | }, |
|
61 | 61 | { |
|
62 | 62 | 'name':'TestVariableController2Async', |
|
63 | 63 | 'sources': ['Variable/TestVariableController2Async.cpp'], |
|
64 | 64 | 'deps': [sciqlop_core, qt5test, qt5Concurrent, TestUtils_dep] |
|
65 | 65 | }, |
|
66 | 66 | { |
|
67 | 67 | 'name':'TestVariableController2WithSync', |
|
68 | 68 | 'sources': ['Variable/TestVariableController2WithSync.cpp'], |
|
69 | 69 | 'deps': [sciqlop_core, qt5test, qt5Concurrent, TestUtils_dep] |
|
70 | 70 | } |
|
71 | 71 | ] |
|
72 | 72 | |
|
73 | 73 | foreach unit_test : tests |
|
74 | 74 | test_moc_files = qt5.preprocess(moc_sources : unit_test['sources']) |
|
75 | 75 | test_exe = executable(unit_test['name'],unit_test['sources'] , test_moc_files, |
|
76 | 76 | dependencies : unit_test['deps'], |
|
77 | 77 | cpp_args : ['-DCORE_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/../tests-resources"'] |
|
78 | 78 | ) |
|
79 | test('Test-' + unit_test['name'], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test['name'])]) | |
|
79 | if get_option('teamcity') | |
|
80 | test_exe_args = ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test['name'])] | |
|
81 | else | |
|
82 | test_exe_args = [] | |
|
83 | endif | |
|
84 | test('Test-' + unit_test['name'], test_exe, args: test_exe_args) | |
|
85 | ||
|
80 | 86 | endforeach |
|
81 | 87 |
General Comments 0
You need to be logged in to leave comments.
Login now