@@ -1,32 +1,45 | |||
|
1 | 1 | |
|
2 | 2 | mockplugin_moc_headers = [ |
|
3 | 3 | 'include/MockPlugin.h' |
|
4 | 4 | ] |
|
5 | 5 | |
|
6 | 6 | mockplugin_sources = [ |
|
7 | 7 | 'src/CosinusProvider.cpp', |
|
8 | 8 | 'src/MockPlugin.cpp' |
|
9 | 9 | ] |
|
10 | 10 | |
|
11 | 11 | mockplugin_inc = include_directories(['include', '../../plugin/include']) |
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | gen = generator(moc, |
|
15 | 15 | output : 'moc_@BASENAME@.cpp', |
|
16 | 16 | arguments : ['@INPUT@', |
|
17 | 17 | '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"', |
|
18 | 18 | '-I', meson.current_source_dir()+'/include', |
|
19 | 19 | '-I', meson.current_source_dir()+'/../../plugin/include', |
|
20 | 20 | '-o', '@OUTPUT@']) |
|
21 | 21 | |
|
22 | 22 | mockplugin_moc_files = gen.process(mockplugin_moc_headers) |
|
23 | 23 | |
|
24 | 24 | sciqlop_mockplugin = library('mockplugin', |
|
25 | 25 | mockplugin_sources, |
|
26 | 26 | mockplugin_moc_files, |
|
27 | 27 | cpp_args : '-DMOCKPLUGIN_LIB', |
|
28 | 28 | include_directories : [mockplugin_inc], |
|
29 | 29 | dependencies : [sciqlop_core, sciqlop_gui], |
|
30 | 30 | install : true |
|
31 | 31 | ) |
|
32 | 32 | |
|
33 | tests = [ | |
|
34 | [['tests/TestCosinusAcquisition.cpp'],'test_cosinus_acquisition','Cosinus Acquisition test'] | |
|
35 | ] | |
|
36 | ||
|
37 | foreach unit_test : tests | |
|
38 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) | |
|
39 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, | |
|
40 | link_with : [sciqlop_mockplugin], | |
|
41 | include_directories : [mockplugin_inc], | |
|
42 | cpp_args : ['-DMOCKPLUGIN_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], | |
|
43 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) | |
|
44 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) | |
|
45 | endforeach No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now