Commit graph

294 commits

Author SHA1 Message Date
da7c12bb61
Don't use dummy test objects when no disks avail 2019-12-05 14:20:17 -07:00
fb4b44fefb
Fixed temps pane under macOS 2019-12-03 18:16:33 -07:00
65c08ad972
Updated disk_self_test()
* Parallel self-tests!
2019-12-03 17:36:52 -07:00
b71bca4577
Updated disk_attribute_check() 2019-12-03 16:31:26 -07:00
445523e5f1
Fix aborting Prime95 test 2019-12-03 15:18:10 -07:00
6da34c1f2b
Only register tmux atexit when running HW Diags
* Prevents unintended killing of tmux panes when importing wk or wk.hw
2019-12-03 15:03:02 -07:00
c0b6606758
Stop Prime95 with INT signal instead of TERM 2019-12-03 14:47:57 -07:00
d1005ad0a9
Updated sensor name formatting 2019-12-02 22:47:09 -07:00
e041125c20
Added hw-sensors 2019-12-02 21:02:12 -07:00
4dc41aec27
Bugfix: mprime typos 2019-12-02 20:31:33 -07:00
4990537082
Handle critical temps correctly in mprime sections
* Moved ThermalLimitReachedError catches to wk.hw.sensors
  * Before they would never be caught and would never stop the script
* Added cpu_reached_critical_temp() to wk.hw.sensors
  * This allows us to check if it happened without exceptions
* Added thermal_action to wk.hw.sensors
  * This is run when ThermalLimitReachedError(s) are caught
* Stop print_countdown if mprime is terminated
  * This is required since it may be killed in the background
2019-12-02 20:11:02 -07:00
c520b5a865
Update for Python 3.8 pylint alerts 2019-12-02 17:55:05 -07:00
7796189d14
Clear screen before all diag functions 2019-12-02 17:54:48 -07:00
aa3b69f6fa
Added progress pane logic 2019-11-30 22:43:10 -07:00
4cadb913e8
Dropped bufsize=1 due to Python 3.8 warning 2019-11-30 21:29:24 -07:00
79371a3fa5
Added results screen to hw-diags 2019-11-14 20:43:44 -07:00
402c4359a1
Split Prime95 and cooling Test() objects 2019-11-14 20:16:15 -07:00
fec2473b93
Fixed Prime95 test length 2019-11-14 19:16:10 -07:00
45086c90bb
Prime95 test fully functional 2019-11-14 19:13:21 -07:00
1a91f72d8c
Running and stopping Prime95 working 2019-11-13 19:45:53 -07:00
46a6dda0ff
Prime95 workflow mostly done 2019-11-13 17:47:52 -07:00
0eadb784bb
Updated get_ram_list_linux() 2019-11-13 11:14:55 -07:00
e18b625281
Updated ClassicStartSkin source URL 2019-11-13 11:08:30 -07:00
aa5b5cd9b7
Selecting and running (dummy) tests now working 2019-11-12 21:10:11 -07:00
d4ca575426
Fix get_disks_macos() 2019-11-12 20:06:18 -07:00
1054794af3
Added get_disks()
* This calls either get_disks_linux() or get_disks_macos()
2019-11-12 19:56:39 -07:00
4e6b2cd4da
Started work on per-pass log handling in hw-diags 2019-11-12 17:32:55 -07:00
9b5d9e1186
Added watch-mac and reverted previous commit
* This allows the degree symbol to be displayed correctly
  * (At least in iTerm2)
2019-11-12 10:36:34 -07:00
4bd4536cfd
Avoid using the unicode degree symbol under macOS
* The (home)brew watch command butchers the unicode?
2019-11-11 23:57:48 -07:00
e3d0902c45
Updated wk.hw.sensors
* Added monitor_to_file()
* Added save_average_temps()
2019-11-11 23:22:47 -07:00
4ecdc80e4c
Added sensor update sections 2019-11-11 22:18:09 -07:00
b15c01ac37
Fixed sensor sections under macOS 2019-11-11 21:47:55 -07:00
dc030ab076
Added initial version of wk.hw.sensors
* Supports Linux and macOS
  * Only initial temp, no updates yet
2019-11-11 21:29:21 -07:00
49c0ce9a62
Support layouts with multiple panes of same type 2019-11-11 17:29:58 -07:00
72905f9ccc
Added CLI options to hw-diags 2019-11-10 21:05:41 -07:00
ee7d656f2a
Delete log atexit if empty 2019-11-10 20:47:59 -07:00
21dfeac20b
Expanded logging in wk.hw.diags 2019-11-10 20:22:48 -07:00
906826d752
Updated TryAndPrint()
* Don't log function name unless in debug mode
* Log msg_good instead of UNKNOWN for non-failed functions with no output
* Avoid issue if function returns int
2019-11-10 20:21:15 -07:00
196e2adc82
Added tmux layout maintenance sections
* Support both threading and signal based calls
  * Should provide a smoother UIX under Linux & macOS
2019-11-10 19:10:35 -07:00
0cbc858cf4
Intentionally crash if not running inside tmux 2019-11-10 18:05:06 -07:00
6963d2ae71
Fix echo usage under macOS 2019-11-10 18:01:07 -07:00
0b6cd1cb6c
Added secret menu options in hw-diags 2019-11-10 17:42:04 -07:00
964885d63c
Ensure tmux panes are closed atexit for hw-diags 2019-11-10 17:38:03 -07:00
76a501af85
Added State() and tmux sections to wk/hw/diags 2019-11-10 17:04:45 -07:00
2520126905
Use broader imports for wk/hw/diags.py 2019-11-10 16:22:04 -07:00
fe228a5edc
Added keyboard_test() 2019-11-10 15:17:00 -07:00
100757ba69
Added network_test() 2019-11-10 14:47:56 -07:00
ce3a98028a
Fixed wk.std.show_data() alignment 2019-11-10 14:29:55 -07:00
2b06375f71
Removed unused hw-diags and hw-diags-audio scripts 2019-11-09 19:35:23 -07:00
8f663072f6
Added HW-Diags audio test, menu, and launcher 2019-11-09 19:25:30 -07:00
05d6fb762c
Added wk/tmux.py 2019-11-09 17:29:31 -07:00
177401ecc8
Small formatting adjustment 2019-11-09 17:28:43 -07:00
920f481049
Adjusted DEBUG log date format 2019-11-09 14:25:22 -07:00
27b75ab8e9
Added README.md with pylint config info 2019-11-08 16:01:58 -07:00
205c5ed0fc
Support model-specifc attribute thresholds
* Addresses issue #142
2019-11-08 16:00:27 -07:00
3a2924bd51
Added print_report() 2019-11-08 14:08:16 -07:00
b7c790438a
Updated launch-in-tmux
* Don't exit shells, just the function
* Don't leave dangling tmux sessions if possible
* Restore original session/window name if using an active tmux session
2019-11-08 13:50:26 -07:00
a053931c17
Added Test() object 2019-11-07 20:46:21 -07:00
b162c99d6e
Added BaseObj() class 2019-11-07 20:40:50 -07:00
12de0e5b84
Inlcude RAM vendor ID for unknown IDs 2019-11-07 18:58:20 -07:00
0e9b1af56b
Added safety check to Disk().get_details() 2019-11-07 18:57:31 -07:00
d933ff9742
Reordered functions 2019-11-01 18:52:26 -06:00
e634d1691f
Added SMART self-test sections 2019-11-01 18:51:02 -06:00
93102b5144
Reworked checking Disk() attributes
* Added separate Disk().check_attributes() function
  * Can be used to check all KNOWN_ATTRIBUTES or just blocking ones
* Renamed ATTRIBUTES to KNOWN_ATTRIBUTES for clarity
  * Renamed 'Critical' column to 'Blocking'
* Added '(Failed)' note to attribute report
  * Addresses issue #131
2019-10-31 19:19:52 -06:00
07fdbcdd7c
Added Disk().safety_checks()
* Raises an exception for blocking events
* Removed "Ignore" column from ATTRIBUTES
  * Listed attributes should either be warnings or errors
  * Only 'Critical' attributes should block futher tests
2019-10-31 18:28:34 -06:00
d25b341eb3
Added is_4k_aligned_macos() 2019-10-31 16:48:30 -06:00
5d6b7578d3
Fixed 4K alignment check under Linux 2019-10-31 16:34:54 -06:00
2a019d09a0
Updated Disk notes sections 2019-10-31 16:33:35 -06:00
117df6158a
Fix attribute value colors 2019-10-28 20:57:34 -06:00
ae5e9b8f34
Added 4K alignment check 2019-10-28 20:45:30 -06:00
c7090e77c2
Added Disk().generate_report()
* Uses new merged ATTRIBUTES config
2019-10-28 20:15:58 -06:00
fbb480dae6
Adjusted drive details
* Use 'bus' instead of 'proto(col)' or 'tran'
  * I think it's a better description
* Reordered details alphanumerically
* Removed 'log-sec' from required details
  * Only concerned with the phy-sec
2019-10-28 17:55:37 -06:00
6a1be5cf06
Moved wk.obj to wk.hw.obj
* Done because the main classes are CpuRam() and Disk()
  * The rest are there for uniformity while working with HW objects
2019-10-28 17:46:17 -06:00
c0242ad55c
Added macOS support for disk details and SMART 2019-10-25 19:13:04 -06:00
70248ef0b5
Added macOS support for CpuRam() object. 2019-10-23 20:33:41 -07:00
07120b7dc4
Fixed Disk() description and SMART data 2019-10-23 16:28:55 -07:00
52d61226a0
Added Disk() obj 2019-10-23 15:23:50 -07:00
6e557da370
Added CpuRAM() object. 2019-10-22 18:49:44 -07:00
c9b3794f0e
Renamed some vars for consistency 2019-10-22 18:43:04 -07:00
2b5254dd0c
Bugfix check_disk.py
* Now passes pylint
2019-10-21 18:57:53 -07:00
3ecf107c39
Adjusted print_colored() kwargs 2019-10-21 18:57:31 -07:00
193511d83b
Added color_string(), blink "colors", and more
* The list of strings are now joined using ' ' by default
  * Instead of ''
* Added YELLOW_BLINK and RED_BLINK escape codes
* print_colored() now optionally logs the msg
2019-10-21 18:51:32 -07:00
89f62562f0
Removed reference sections from wk.prev 2019-10-02 22:58:24 -07:00
187a29ff6f
Bugfix speedtest() 2019-10-02 22:44:36 -07:00
cc483abd29
Added ping()
Added ping()
Added ping()
Added ping()
Added ping()
Added ping()
Added ping()
Added ping()
Added ping()
2019-10-02 22:31:54 -07:00
386299ce57
Added network functions 2019-10-02 22:26:10 -07:00
e80a63ee51
Added show_data() 2019-10-02 22:25:54 -07:00
a2017fa415
Added check_disk.py 2019-10-02 21:40:56 -07:00
ad06fab8a2
Updated log path options
* Adjusted default log path
* Support Windows Kit/Tool/General log paths
2019-10-02 21:34:07 -07:00
1ffabd8642
Updated wk.os.win 2019-09-23 00:01:54 -07:00
4c35d7cb4e
Added CHKDSK functions 2019-09-22 23:34:02 -07:00
ff1044a401
Fixed logic error in non_clobber_path()
* Before the '_1000' path would be returned incorrectly
  * If a non-existant path wasn't found that is
2019-09-22 23:31:15 -07:00
60969f26eb
Reworked setting log paths
* Added DEFAULT_LOG_DIR and DEFAULT_LOG_NAME vars
  * Allows easier reuse of default values
* Added format_log_path()
  * Uses default path/name unless dir/name specified
* Added get_root_logger_path()
  * Returns the first fileHandler path found (if any)
* update_log_path() now supports multiple handler scenarios
2019-09-22 23:27:41 -07:00
2ea0b4818a
Updated run_sfc_scan()
* Output is UTF-16, decode it as such
  * Simplifies section
* Reworked checking the result
  * Use separate exceptions for corruption and general errors
2019-09-22 21:50:08 -07:00
972cb6fb66
Breaking updates to TryAndPrint()
* Removed print_return argument
  * Instead if the function returns data assume it should be printed
* Added ability to override msg_good for a single run() call
2019-09-22 21:27:28 -07:00
9ee664bc2b
Dropping CBS fix sections 2019-09-22 21:26:48 -07:00
1cfd8fb7b4
Added outer activation script 2019-09-22 20:06:40 -07:00
f27f3024e8
Added get_json_from_command() 2019-09-18 22:37:18 -07:00
115a462f6e
Added Windows activation functions 2019-09-18 22:27:38 -07:00
0636a032be
Added threading functions 2019-09-18 21:51:39 -07:00
27d348bf9c
Expanded debug log 2019-09-18 21:36:39 -07:00
f1775766e7
Updated wk.log.update_log_path()
* The log file is now moved instead of copied
* The new path can now be based on a new dir, name, or both
2019-09-18 20:58:06 -07:00
318f59c473
Added logging to print functions 2019-09-18 20:23:13 -07:00
5925aca3c2
Allow strings to be passed to print_colored() 2019-09-18 20:02:39 -07:00
f55f0ba016
Adjusted logging in TryAndPrint() 2019-09-18 20:02:13 -07:00
304d811698
Moved exe functions to a separate file 2019-09-18 18:49:56 -07:00
2678ce77da
Added SFC scan 2019-09-15 19:34:06 -07:00
b41027562a
Added SafeMode enter/exit sections 2019-09-15 18:47:52 -07:00
78e3765730
Added delete_item() 2019-09-15 17:29:10 -07:00
010ac87de6
Added delete_empty_folders() and delete_folder() 2019-09-15 16:50:06 -07:00
7a99713043
Added non_clobbering_path() 2019-09-15 16:28:47 -07:00
6af5f78fbb
Dropping wk/exe.py
* All intended functionality now in std.py
2019-09-15 15:34:27 -07:00
8ca59a029a
Added popen_program() 2019-09-15 15:32:34 -07:00
40413151c8
Added run_program() 2019-09-15 15:10:13 -07:00
6f60006c9a
Added get, kill, and wait process functions 2019-09-15 14:35:32 -07:00
b71f1d8d80
Reordered functions 2019-09-15 13:33:59 -07:00
8c8eea0f9a
Adjusted pylint settings 2019-09-13 22:48:33 -07:00
7cb5ecd09f
Added TryAndPrint() class
* Replaces try_and_print() function
* Moved several functions to TryAndPrint() class
  * _format_exception_message()
  * _format_function_output()
  * _get_exception()
* Separates the formatting settings and the function paramters
2019-09-13 22:35:39 -07:00
8d9e264efc
Fix menu checkmark under macOS 2019-09-13 21:02:56 -07:00
3d95d9c1a1
Fixed clear_screen() under Windows 2019-09-13 20:47:27 -07:00
4d6fad82db
Adjusted menu index formatting
* Right-align numbered and action text
2019-09-13 20:29:18 -07:00
94dac676fe
Updated formatting 2019-09-13 20:29:05 -07:00
a59f20ac8b
Support optional extra separators in Menu() 2019-09-13 19:44:56 -07:00
428bb5a05c
Updated advanced_select() 2019-09-13 18:45:07 -07:00
21b44d01ff
Added avanced_select() to Menu()
* Renamed 'Enabled' to 'Selected' for clarity
2019-09-13 18:41:47 -07:00
9da19f3702
Added support for hidden menu entries 2019-09-13 17:49:44 -07:00
f1a1a158ba
Added simple_select() to wk.std.Menu()
* Allows user to select one entry from available entries
2019-09-13 16:16:33 -07:00
68000272ea
Improved clear_screen()
* Now uses subprocess.run() instead of os.system()
* Avoids weird clear -> print issues
  * i.e. Missing newlines, etc
2019-09-13 16:14:36 -07:00
e52e90454d
Fix seperator length 2019-09-07 15:44:38 -06:00
d7fc209e53
Added some doctests 2019-09-07 15:17:54 -06:00
849c53a62d
Include try_and_print result in log 2019-08-22 17:29:50 -06:00
2b08654d7c
Fixed _get_separator_length()
* Use title line(s) and 'Display Name' instead of name
  * Menu()._update() is required to be run previously
2019-08-20 22:34:38 -06:00
1542ba39cd
Fixed _get_valid_answers()
* Correctly omits disabled items
2019-08-20 22:12:09 -06:00
34d5106804
Added _get_valid_answers() to Menu() 2019-08-20 22:05:20 -06:00
1f96ae5c53
Renamed _show() to _generate_menu_text()
* It returns a string instead of printing the text
2019-08-20 22:04:42 -06:00
bd3440daa9
Updated Menu()
* Added logic for disabled items
* Use 'Display Name' in _show()
2019-08-20 21:49:42 -06:00
8cedac738e
Added _get_display_name() and _update() to Menu()
* _update()
  * Calls _get_display_name()
  * Used to update the state of the menu
  * Will add set logic to this method later
2019-08-20 21:18:47 -06:00
7a9c569251
Separating public and private methods 2019-08-20 21:15:59 -06:00
0707d650f6
Started work on the new Menu() object
* This will replace the old menu_select() function
* This will contain all toggle/set/selection logic
  * Which would allow for simpler usage in other sections/scripts/etc
2019-08-20 20:32:37 -06:00
516dc88d44
Removed improper NotImplementedError usage 2019-08-20 19:21:44 -06:00
c43539a92d
Switching to f-strings where appropriate 2019-08-20 16:00:08 -06:00
b314a9f1e2
Bugfix updates for try_and_print() 2019-08-09 21:57:41 -06:00
4100c38280
Added generic exception classes 2019-08-09 20:34:05 -06:00
d722754f12
Replaced UserWarnings with proper exceptions 2019-08-09 20:10:13 -06:00
147b9d2035
Added format_exception_message() 2019-08-09 19:50:45 -06:00
4e5bef23da
Added format_function_output() 2019-08-09 19:06:06 -06:00
ff4e371b32
Added get_exception() and try_and_print()
* try_and_print needs the format_..() functions finished before it can be used
* Raised minimum Python version to 3.7
  * Probably could go with 3.6 but meh
2019-08-09 19:00:01 -06:00
36e2ad8522
Updated cfg/main
* Added INDENT and WIDTH
2019-08-09 17:17:46 -06:00
11d9a5203e
Adjusted docstrings 2019-08-09 16:42:00 -06:00
cf5b546183
Compress report before uploading
* It's the new default but it can be disabled
2019-08-07 19:27:49 -06:00