blob: 923ead6436d32329007998f5344be560d18fc24f [file] [log] [blame]
Patrick Williamsd9f0d642021-04-21 15:43:21 -05001openpower_pels = {
2 'additional_data': {},
3 'ascii_string': {},
4 'bcd_time': {},
Matt Spinler0d92b522021-06-16 13:28:17 -06005 'data_interface': {},
Patrick Williamsd9f0d642021-04-21 15:43:21 -05006 'device_callouts': {},
7 'event_logger': {},
8 'extended_user_data': {},
9 'extended_user_header': {},
10 'failing_mtms': {},
11 'fru_identity': {},
12 'generic_section': {},
13 'host_notifier': {
14 'sources': [
15 '../../extensions/openpower-pels/host_notifier.cpp',
16 '../../extensions/openpower-pels/repository.cpp',
17 ],
18 },
19 'json_utils': {},
20 'log_id': {},
21 'mru': {},
22 'mtms': {},
23 'pce_identity': {},
24 'pel_manager': {
25 'sources': [
26 '../../elog_entry.cpp',
William A. Kennington IIIe0538842021-06-11 02:01:58 -070027 '../../elog_meta.cpp',
Patrick Williamsd9f0d642021-04-21 15:43:21 -050028 '../../elog_serialize.cpp',
29 '../../extensions.cpp',
30 '../../log_manager.cpp',
31 elog_lookup_gen,
32 elog_process_gen,
33 generated_sources,
34 log_manager_ext_sources,
35 ],
36 'deps': [ cereal_dep ],
37 },
38 'pel_rules': {},
39 'pel': {},
40 'pel_values': {},
41 'private_header': {},
42 'real_pel': {},
43 'registry': {},
44 'repository': {
45 'sources': [
46 '../../extensions/openpower-pels/repository.cpp',
47 ],
48 },
49 'section_header': {},
50 'service_indicators': {},
51 'severity': {},
52 'src': {},
53 'src_callout': {},
54 'src_callouts': {},
55 'stream': {},
56 'user_data': {},
57 'user_header': {},
Jayanth Othayothbf54cbb2021-06-03 04:36:48 -050058 'temporary_file': {
59 'sources': [
60 '../../extensions/openpower-pels/temporary_file.cpp',
61 ],
62 },
Patrick Williamsd9f0d642021-04-21 15:43:21 -050063}
64
65# Build a common shared library for all openpower tests of all the widely
66# used sources under test.
67openpower_test_lib = static_library(
68 'openpower_test_lib',
69 'pel_utils.cpp',
70 'paths.cpp',
71 libpel_sources,
72 peltool_sources,
William A. Kennington IIIb6b25572021-05-19 17:09:41 -070073 '../common.cpp',
Patrick Williamsd9f0d642021-04-21 15:43:21 -050074 '../../util.cpp',
Patrick Williamsd9f0d642021-04-21 15:43:21 -050075 include_directories: include_directories(
76 '../../',
77 '../../gen',
78 ),
79 dependencies: [
80 libpel_deps,
81 peltool_deps,
82 ],
83)
84
85foreach t : openpower_pels.keys()
86 test(
87 'test_openpower_pels_' + t.underscorify(),
88 executable(
89 'test-openpower-pels-' + t.underscorify(),
90 t + '_test.cpp',
91 openpower_pels.get(t).get('sources', []),
92 link_with: [
93 openpower_test_lib,
Patrick Williamsd9f0d642021-04-21 15:43:21 -050094 ],
95 link_args: [ '-lpython' + python_ver ],
Patrick Williamsd9f0d642021-04-21 15:43:21 -050096 dependencies: [
97 gtest_dep,
98 gmock_dep,
William A. Kennington IIIe0538842021-06-11 02:01:58 -070099 phosphor_logging_dep,
Patrick Williamsd9f0d642021-04-21 15:43:21 -0500100 libpel_deps,
101 peltool_deps,
102 openpower_pels.get(t).get('deps', []),
103 ],
104 include_directories: include_directories(
105 '../../',
106 '../../gen',
107 ),
108 )
109 )
110endforeach