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