Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 1 | openpower_pels = { |
| 2 | 'additional_data': {}, |
| 3 | 'ascii_string': {}, |
| 4 | 'bcd_time': {}, |
Matt Spinler | 0d92b52 | 2021-06-16 13:28:17 -0600 | [diff] [blame] | 5 | 'data_interface': {}, |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 6 | '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 III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 27 | '../../elog_meta.cpp', |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 28 | '../../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 Othayoth | bf54cbb | 2021-06-03 04:36:48 -0500 | [diff] [blame] | 58 | 'temporary_file': { |
| 59 | 'sources': [ |
| 60 | '../../extensions/openpower-pels/temporary_file.cpp', |
| 61 | ], |
| 62 | }, |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | # Build a common shared library for all openpower tests of all the widely |
| 66 | # used sources under test. |
| 67 | openpower_test_lib = static_library( |
| 68 | 'openpower_test_lib', |
| 69 | 'pel_utils.cpp', |
| 70 | 'paths.cpp', |
| 71 | libpel_sources, |
| 72 | peltool_sources, |
William A. Kennington III | b6b2557 | 2021-05-19 17:09:41 -0700 | [diff] [blame] | 73 | '../common.cpp', |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 74 | '../../util.cpp', |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 75 | include_directories: include_directories( |
| 76 | '../../', |
| 77 | '../../gen', |
| 78 | ), |
| 79 | dependencies: [ |
| 80 | libpel_deps, |
| 81 | peltool_deps, |
| 82 | ], |
| 83 | ) |
| 84 | |
| 85 | foreach 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 Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 94 | ], |
| 95 | link_args: [ '-lpython' + python_ver ], |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 96 | dependencies: [ |
| 97 | gtest_dep, |
| 98 | gmock_dep, |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 99 | phosphor_logging_dep, |
Patrick Williams | d9f0d64 | 2021-04-21 15:43:21 -0500 | [diff] [blame] | 100 | libpel_deps, |
| 101 | peltool_deps, |
| 102 | openpower_pels.get(t).get('deps', []), |
| 103 | ], |
| 104 | include_directories: include_directories( |
| 105 | '../../', |
| 106 | '../../gen', |
| 107 | ), |
| 108 | ) |
| 109 | ) |
| 110 | endforeach |