##// END OF EJS Templates
Added fuzzy tests and small fixes on meson files...
jeandet -
r1333:f1b0e148bd5a
parent child
Show More
@@ -1,75 +1,75
1 1
2 2 qxorm_dep = dependency('QxOrm', required : true, fallback:['QxOrm','qxorm_dep'])
3 3 catalogueapi_dep = dependency('CatalogueAPI', required : true, fallback:['CatalogueAPI','CatalogueAPI_dep'])
4 4
5 5
6 6 core_moc_headers = [
7 7 'include/Catalogue/CatalogueController.h',
8 8 'include/Common/SignalWaiter.h',
9 9 'include/Data/IDataProvider.h',
10 10 'include/DataSource/DataSourceController.h',
11 11 'include/DataSource/DataSourceItemAction.h',
12 12 'include/Network/NetworkController.h',
13 13 'include/Time/TimeController.h',
14 14 'include/Variable/Variable.h',
15 15 'include/Variable/VariableCacheController.h',
16 16 'include/Variable/VariableController.h',
17 17 'include/Variable/VariableAcquisitionWorker.h',
18 18 'include/Variable/VariableSynchronizationGroup.h',
19 19 'include/Variable/VariableModel.h',
20 20 'include/Visualization/VisualizationController.h'
21 21 ]
22 22
23 23
24 24 core_moc_files = qt5.preprocess(moc_headers : core_moc_headers)
25 25
26 26 core_sources = [
27 27 'src/Common/DateUtils.cpp',
28 28 'src/Common/SignalWaiter.cpp',
29 29 'src/Common/StringUtils.cpp',
30 30 'src/Common/MimeTypesDef.cpp',
31 31 'src/Catalogue/CatalogueController.cpp',
32 32 'src/Data/ScalarSeries.cpp',
33 33 'src/Data/SpectrogramSeries.cpp',
34 34 'src/Data/DataSeriesIterator.cpp',
35 35 'src/Data/ArrayDataIterator.cpp',
36 36 'src/Data/VectorSeries.cpp',
37 37 'src/Data/OptionalAxis.cpp',
38 38 'src/Data/DataSeriesUtils.cpp',
39 39 'src/DataSource/DataSourceController.cpp',
40 40 'src/DataSource/DataSourceItem.cpp',
41 41 'src/DataSource/DataSourceItemAction.cpp',
42 42 'src/DataSource/DataSourceItemMergeHelper.cpp',
43 43 'src/Network/NetworkController.cpp',
44 'src/Plugin/PluginManager.cpp',
44 'src/PluginManager/PluginManager.cpp',
45 45 'src/Settings/SqpSettingsDefs.cpp',
46 46 'src/Time/TimeController.cpp',
47 47 'src/Variable/Variable.cpp',
48 48 'src/Variable/VariableCacheController.cpp',
49 49 'src/Variable/VariableController.cpp',
50 50 'src/Variable/VariableAcquisitionWorker.cpp',
51 51 'src/Variable/VariableSynchronizationGroup.cpp',
52 52 'src/Variable/VariableModel.cpp',
53 53 'src/Visualization/VisualizationController.cpp'
54 54 ]
55 55
56 core_inc = include_directories(['include', '../plugin/include'])
56 core_inc = include_directories(['include', 'include/Plugin'])
57 57
58 58 sciqlop_core_lib = library('sciqlopcore',
59 59 core_sources,
60 60 core_moc_files,
61 61 cpp_args : '-DCORE_LIB',
62 62 include_directories : core_inc,
63 63 dependencies : [qt5core, qt5network, catalogueapi_dep],
64 64 install : true
65 65 )
66 66
67 67
68 68 sciqlop_core = declare_dependency(link_with : sciqlop_core_lib,
69 69 include_directories : core_inc,
70 70 dependencies : [qt5core, qt5network, catalogueapi_dep])
71 71
72 72
73 73
74 74 subdir('tests')
75 75
@@ -1,31 +1,40
1 1 include_directories(include)
2 2 FILE (GLOB_RECURSE amdaplugin_SRCS
3 3 include/*.h
4 4 src/*.cpp
5 5 resources/*.qrc
6 6 )
7 7
8
9 set(AMDA_server_type hybrid CACHE STRING "AMDA server type selected at CMake configure time")
10
11 set(AMDA_SERVER_TYPE "hybrid;amdatest;localhost" CACHE STRING
12 "List of possible for AMDA server type")
13
14 set_property(CACHE AMDA_server_type PROPERTY STRINGS ${AMDA_SERVER_TYPE})
15 add_definitions(-DSCIQLOP_AMDA_SERVER="{AMDA_server_type}")
16
8 17 add_definitions(-DQT_PLUGIN)
9 18 add_definitions(-DSCIQLOP_PLUGIN_JSON_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/amda.json")
10 19 if(NOT BUILD_SHARED_LIBS)
11 20 add_definitions(-DQT_STATICPLUGIN)
12 21 endif()
13 22
14 23 add_library(amdaplugin ${amdaplugin_SRCS})
15 24 SET_TARGET_PROPERTIES(amdaplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
16 25
17 26 target_link_libraries(amdaplugin PUBLIC sciqlopgui)
18 27
19 28 install(TARGETS amdaplugin
20 29 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQlop
21 30 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQlop
22 31 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
23 32
24 33 include(sciqlop_tests)
25 34
26 35 add_definitions(-DAMDA_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/tests-resources")
27 36
28 37 declare_test(TestAmdaParser TestAmdaParser tests/TestAmdaParser.cpp "amdaplugin;Qt5::Test")
29 38 declare_test(TestAmdaResultParser TestAmdaResultParser tests/TestAmdaResultParser.cpp "amdaplugin;Qt5::Test")
30 39 declare_test(TestAmdaAcquisition TestAmdaAcquisition tests/TestAmdaAcquisition.cpp "amdaplugin;Qt5::Test")
31
40 declare_test(TestAmdaFuzzing TestAmdaFuzzing "tests/TestAmdaFuzzing.cpp;tests/FuzzingValidators.cpp;tests/FuzzingUtils.cpp;tests/FuzzingOperations.cpp;tests/FuzzingDefs.cpp" "amdaplugin;Qt5::Test")
@@ -1,89 +1,89
1 1
2 2 amdaplugin_moc_headers = [
3 3 'include/AmdaPlugin.h',
4 4 'include/AmdaProvider.h'
5 5 ]
6 6
7 7 amdaplugin_sources = [
8 8 'src/AmdaDefs.cpp',
9 9 'src/AmdaParser.cpp',
10 10 'src/AmdaPlugin.cpp',
11 11 'src/AmdaProvider.cpp',
12 12 'src/AmdaResultParser.cpp',
13 13 'src/AmdaResultParserDefs.cpp',
14 14 'src/AmdaResultParserHelper.cpp',
15 15 'src/AmdaServer.cpp'
16 16 ]
17 17
18 18 amdaplugin_ui_files = []
19 19 amdaplugin_resources_files = [
20 20 'resources/amdaresources.qrc'
21 21 ]
22 22
23 amdaplugin_inc = include_directories(['include', '../../plugin/include'])
23 amdaplugin_inc = include_directories(['include'])
24 24
25 25 moc_gen = generator(moc,
26 26 output : 'moc_@BASENAME@.cpp',
27 27 arguments : ['@INPUT@',
28 28 '-DSCIQLOP_PLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"',
29 29 '-I', meson.current_source_dir()+'/include',
30 '-I', meson.current_source_dir()+'/../../plugin/include',
30 '-I', meson.current_source_dir()+'/../../core/include/',
31 31 '-o', '@OUTPUT@'])
32 32
33 33 rcc_gen = generator(rcc,
34 34 output : 'qrc_@BASENAME@.cpp',
35 35 arguments : ['--name=@BASENAME@"',
36 36 '--output',
37 37 '@OUTPUT@',
38 38 '@INPUT@'])
39 39
40 40 amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers)
41 41
42 42 amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files)
43 43
44 44 #amdaplugin_rcc_plugin_files = qt5.preprocess(
45 45 # qresources : amdaplugin_resources_files)
46 46
47 47 amdaplugin_moc_files = qt5.preprocess(
48 48 ui_files : amdaplugin_ui_files)
49 49
50 50 sciqlop_amdaplugin = library('amdaplugin',
51 51 amdaplugin_sources,
52 52 amdaplugin_moc_files,
53 53 amdaplugin_rcc_plugin_files,
54 54 amdaplugin_moc_plugin_files,
55 55 cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'],
56 56 include_directories : [amdaplugin_inc],
57 57 dependencies : [sciqlop_core, sciqlop_gui],
58 58 install : true
59 59 )
60 60
61 61
62 62 tests = [
63 63 [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'],
64 64 [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'],
65 65 [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'],
66 66 [['tests/TestAmdaFuzzing.cpp'],'test_amda_fuzzing','AMDA fuzzing test']
67 67 ]
68 68
69 69 tests_sources = [
70 70 'tests/FuzzingDefs.h',
71 71 'tests/FuzzingDefs.cpp',
72 72 'tests/FuzzingOperations.h',
73 73 'tests/FuzzingOperations.cpp',
74 74 'tests/FuzzingUtils.h',
75 75 'tests/FuzzingUtils.cpp',
76 76 'tests/FuzzingValidators.h',
77 77 'tests/FuzzingValidators.cpp'
78 78 ]
79 79
80 80 foreach unit_test : tests
81 81 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
82 82 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
83 83 link_with : [sciqlop_amdaplugin],
84 84 include_directories : [amdaplugin_inc],
85 85 cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'],
86 86 sources : [tests_sources],
87 87 dependencies : [sciqlop_core, sciqlop_gui, qt5test])
88 88 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60)
89 89 endforeach
@@ -1,46 +1,46
1 1
2 2 mockplugin_moc_headers = [
3 3 'include/MockPlugin.h'
4 4 ]
5 5
6 6 mockplugin_sources = [
7 7 'src/MockDefs.cpp',
8 8 'src/CosinusProvider.cpp',
9 9 'src/MockPlugin.cpp'
10 10 ]
11 11
12 mockplugin_inc = include_directories(['include', '../../plugin/include'])
12 mockplugin_inc = include_directories(['include'])
13 13
14 14
15 15 gen = generator(moc,
16 16 output : 'moc_@BASENAME@.cpp',
17 17 arguments : ['@INPUT@',
18 18 '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"',
19 19 '-I', meson.current_source_dir()+'/include',
20 '-I', meson.current_source_dir()+'/../../plugin/include',
20 '-I', meson.current_source_dir()+'/../../core/include/',
21 21 '-o', '@OUTPUT@'])
22 22
23 23 mockplugin_moc_files = gen.process(mockplugin_moc_headers)
24 24
25 25 sciqlop_mockplugin = library('mockplugin',
26 26 mockplugin_sources,
27 27 mockplugin_moc_files,
28 28 cpp_args : '-DMOCKPLUGIN_LIB',
29 29 include_directories : [mockplugin_inc],
30 30 dependencies : [sciqlop_core, sciqlop_gui],
31 31 install : true
32 32 )
33 33
34 34 tests = [
35 35 [['tests/TestCosinusAcquisition.cpp'],'test_cosinus_acquisition','Cosinus Acquisition test']
36 36 ]
37 37
38 38 foreach unit_test : tests
39 39 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
40 40 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
41 41 link_with : [sciqlop_mockplugin],
42 42 include_directories : [mockplugin_inc],
43 43 cpp_args : ['-DMOCKPLUGIN_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'],
44 44 dependencies : [sciqlop_core, sciqlop_gui, qt5test])
45 45 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60)
46 endforeach No newline at end of file
46 endforeach
General Comments 0
You need to be logged in to leave comments. Login now