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