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