blob: b6c6a94e715fd77f8a6f6dcdab9d6c2a3d2f8e9b [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,
Matt Spinler4fd14212022-07-20 10:32:26 -050082 gtest_dep,
Patrick Williamsd9f0d642021-04-21 15:43:21 -050083 ],
84)
85
86foreach t : openpower_pels.keys()
87 test(
88 'test_openpower_pels_' + t.underscorify(),
89 executable(
90 'test-openpower-pels-' + t.underscorify(),
91 t + '_test.cpp',
92 openpower_pels.get(t).get('sources', []),
93 link_with: [
94 openpower_test_lib,
Patrick Williamsd9f0d642021-04-21 15:43:21 -050095 ],
96 link_args: [ '-lpython' + python_ver ],
Patrick Williamsd9f0d642021-04-21 15:43:21 -050097 dependencies: [
98 gtest_dep,
99 gmock_dep,
William A. Kennington IIIe0538842021-06-11 02:01:58 -0700100 phosphor_logging_dep,
Patrick Williamsd9f0d642021-04-21 15:43:21 -0500101 libpel_deps,
102 peltool_deps,
103 openpower_pels.get(t).get('deps', []),
104 ],
105 include_directories: include_directories(
106 '../../',
107 '../../gen',
108 ),
109 )
110 )
111endforeach