diff --git a/scripts/wk/hw/diags.py b/scripts/wk/hw/diags.py index 1c321f4c..2192a62e 100644 --- a/scripts/wk/hw/diags.py +++ b/scripts/wk/hw/diags.py @@ -56,7 +56,7 @@ IO_SIZE_SKIP_NAME = ( TEST_GROUPS = { # Also used to build the menu options ## NOTE: This needs to be above MENU_SETS - 'System Info': 'system_info', + 'System Info': 'post_system_info', 'CPU & Cooling': 'cpu_stress_tests', 'Disk Attributes': 'disk_attribute_check', 'Disk Self-Test': 'disk_self_test', @@ -208,6 +208,16 @@ class State(): # Only add selected options continue + if 'System' in name: + test = Test(dev=self.system, label=name, name=name) + self.test_groups.append( + TestGroup( + name=name, + function=globals()[TEST_GROUPS[name]], + test_objects=[test], + ) + ) + if 'CPU' in name: # Create two Test objects which will both be used by cpu_stress_tests # NOTE: Prime95 should be added first @@ -890,7 +900,8 @@ def main() -> None: state.update_top_pane('Main Menu') -def post_system_info(state) -> None: +def post_system_info(state, quick_mode=False, test_mode=False) -> None: + # pylint: disable=unused-argument """Post system info to osTicket.""" report = state.system.generate_full_report() if state.disks: @@ -956,17 +967,13 @@ def run_diags(state, menu, quick_mode=False, test_mode=False) -> None: # Just return if no tests were selected if not state.test_groups: - if not menu.options['System Info']['Selected']: - std.print_warning('No tests selected?') - std.pause() - return + std.print_warning('No tests selected?') + std.pause() + return # osTicket _init_osticket() - # Post system info - post_system_info(state) - # Run tests for group in state.test_groups: