xref: /openbmc/phosphor-logging/test/openpower-pels/meson.build (revision fa2d962b5da807ac17bb7a355709ff05dd10d041)
1d9f0d646SPatrick Williamsopenpower_pels = {
2d9f0d646SPatrick Williams    'additional_data': {},
3d9f0d646SPatrick Williams    'ascii_string': {},
4d9f0d646SPatrick Williams    'bcd_time': {},
50d92b528SMatt Spinler    'data_interface': {},
6d9f0d646SPatrick Williams    'device_callouts': {},
7d9f0d646SPatrick Williams    'event_logger': {},
8d9f0d646SPatrick Williams    'extended_user_data': {},
9d9f0d646SPatrick Williams    'extended_user_header': {},
10d9f0d646SPatrick Williams    'failing_mtms': {},
11d9f0d646SPatrick Williams    'fru_identity': {},
12d9f0d646SPatrick Williams    'generic_section': {},
13d9f0d646SPatrick Williams    'host_notifier': {
14d9f0d646SPatrick Williams        'sources': [
15d9f0d646SPatrick Williams            '../../extensions/openpower-pels/host_notifier.cpp',
16d9f0d646SPatrick Williams            '../../extensions/openpower-pels/repository.cpp',
17d9f0d646SPatrick Williams        ],
18d9f0d646SPatrick Williams    },
19d9f0d646SPatrick Williams    'json_utils': {},
20d9f0d646SPatrick Williams    'log_id': {},
21d9f0d646SPatrick Williams    'mru': {},
22d9f0d646SPatrick Williams    'mtms': {},
23d9f0d646SPatrick Williams    'pce_identity': {},
24d9f0d646SPatrick Williams    'pel_manager': {
25d9f0d646SPatrick Williams        'sources': [
26d9f0d646SPatrick Williams            '../../elog_entry.cpp',
27e0538848SWilliam A. Kennington III            '../../elog_meta.cpp',
28d9f0d646SPatrick Williams            '../../elog_serialize.cpp',
29d9f0d646SPatrick Williams            '../../extensions.cpp',
30d9f0d646SPatrick Williams            '../../log_manager.cpp',
31d9f0d646SPatrick Williams            elog_lookup_gen,
32d9f0d646SPatrick Williams            elog_process_gen,
33d9f0d646SPatrick Williams            generated_sources,
34d9f0d646SPatrick Williams            log_manager_ext_sources,
35d9f0d646SPatrick Williams        ],
36d9f0d646SPatrick Williams        'deps': [ cereal_dep ],
37d9f0d646SPatrick Williams    },
38d9f0d646SPatrick Williams    'pel_rules': {},
39d9f0d646SPatrick Williams    'pel': {},
40d9f0d646SPatrick Williams    'pel_values': {},
41d9f0d646SPatrick Williams    'private_header': {},
42d9f0d646SPatrick Williams    'real_pel': {},
43d9f0d646SPatrick Williams    'registry': {},
44d9f0d646SPatrick Williams    'repository': {
45d9f0d646SPatrick Williams        'sources': [
46d9f0d646SPatrick Williams            '../../extensions/openpower-pels/repository.cpp',
47d9f0d646SPatrick Williams        ],
48d9f0d646SPatrick Williams    },
49d9f0d646SPatrick Williams    'section_header': {},
50d9f0d646SPatrick Williams    'service_indicators': {},
51d9f0d646SPatrick Williams    'severity': {},
52d9f0d646SPatrick Williams    'src': {},
53d9f0d646SPatrick Williams    'src_callout': {},
54d9f0d646SPatrick Williams    'src_callouts': {},
55d9f0d646SPatrick Williams    'stream': {},
56d9f0d646SPatrick Williams    'user_data': {},
57d9f0d646SPatrick Williams    'user_header': {},
58bf54cbb1SJayanth Othayoth    'temporary_file': {
59bf54cbb1SJayanth Othayoth         'sources': [
60bf54cbb1SJayanth Othayoth            '../../extensions/openpower-pels/temporary_file.cpp',
61bf54cbb1SJayanth Othayoth        ],
62bf54cbb1SJayanth Othayoth    },
63d9f0d646SPatrick Williams}
64d9f0d646SPatrick Williams
65d9f0d646SPatrick Williams# Build a common shared library for all openpower tests of all the widely
66d9f0d646SPatrick Williams# used sources under test.
67d9f0d646SPatrick Williamsopenpower_test_lib = static_library(
68d9f0d646SPatrick Williams    'openpower_test_lib',
69d9f0d646SPatrick Williams    'pel_utils.cpp',
70*fa2d962bSPatrick Williams    'pel_paths.cpp',
71d9f0d646SPatrick Williams    libpel_sources,
72d9f0d646SPatrick Williams    peltool_sources,
73b6b25575SWilliam A. Kennington III    '../common.cpp',
74d9f0d646SPatrick Williams    include_directories: include_directories(
75d9f0d646SPatrick Williams        '../../',
76d9f0d646SPatrick Williams        '../../gen',
77d9f0d646SPatrick Williams    ),
78d9f0d646SPatrick Williams    dependencies: [
79d9f0d646SPatrick Williams        libpel_deps,
80d9f0d646SPatrick Williams        peltool_deps,
814fd14219SMatt Spinler        gtest_dep,
82d9f0d646SPatrick Williams    ],
83d9f0d646SPatrick Williams)
84d9f0d646SPatrick Williams
85d9f0d646SPatrick Williamsforeach t : openpower_pels.keys()
86d9f0d646SPatrick Williams    test(
87d9f0d646SPatrick Williams        'test_openpower_pels_' + t.underscorify(),
88d9f0d646SPatrick Williams        executable(
89d9f0d646SPatrick Williams            'test-openpower-pels-' + t.underscorify(),
90d9f0d646SPatrick Williams            t + '_test.cpp',
91d9f0d646SPatrick Williams            openpower_pels.get(t).get('sources', []),
92d9f0d646SPatrick Williams            link_with: [
93d9f0d646SPatrick Williams                openpower_test_lib,
94d9f0d646SPatrick Williams            ],
95d9f0d646SPatrick Williams            link_args: [ '-lpython' + python_ver ],
96d9f0d646SPatrick Williams            dependencies: [
97d9f0d646SPatrick Williams                gtest_dep,
98d9f0d646SPatrick Williams                gmock_dep,
99e0538848SWilliam A. Kennington III                phosphor_logging_dep,
100d9f0d646SPatrick Williams                libpel_deps,
101d9f0d646SPatrick Williams                peltool_deps,
102d9f0d646SPatrick Williams                openpower_pels.get(t).get('deps', []),
103d9f0d646SPatrick Williams            ],
104d9f0d646SPatrick Williams            include_directories: include_directories(
105d9f0d646SPatrick Williams                '../../',
106d9f0d646SPatrick Williams                '../../gen',
107d9f0d646SPatrick Williams            ),
108d9f0d646SPatrick Williams        )
109d9f0d646SPatrick Williams    )
110d9f0d646SPatrick Williamsendforeach
111