amd-debug-tools 0.2.12__tar.gz → 0.2.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {amd_debug_tools-0.2.12/src/amd_debug_tools.egg-info → amd_debug_tools-0.2.13}/PKG-INFO +1 -1
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/s2idle.py +9 -11
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13/src/amd_debug_tools.egg-info}/PKG-INFO +1 -1
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_s2idle.py +3 -9
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/.github/workflows/ci.yml +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/.github/workflows/mirror.yml +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/.gitignore +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/.pre-commit-config.yaml +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/.vscode/settings.json +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/LICENSE +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/Makefile +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/README.md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/amd_bios.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/amd_pstate.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/amd_s2idle.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/amd_ttm.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/docs/amd-bios.md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/docs/amd-pstate.md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/docs/amd-s2idle.md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/docs/amd-ttm.md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/docs/in-tree.md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/install_deps.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/psr.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/pyproject.toml +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/setup.cfg +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/__init__.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/acpi.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/bash/amd-s2idle +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/battery.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/bios.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/common.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/database.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/display.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/failures.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/installer.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/kernel.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/prerequisites.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/pstate.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/s2idle-hook +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/sleep_report.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/templates/html +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/templates/md +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/templates/stdout +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/templates/txt +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/ttm.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/validator.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug/wake.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/SOURCES.txt +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/dependency_links.txt +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/entry_points.txt +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/requires.txt +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/top_level.txt +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/launcher.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_acpi.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_batteries.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_bios.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_common.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_database.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_display.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_failures.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_installer.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_kernel.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_launcher.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_prerequisites.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_pstate.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_sleep_report.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_ttm.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_validator.py +0 -0
- {amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/test_wake.py +0 -0
|
@@ -10,7 +10,6 @@ from datetime import date, timedelta, datetime
|
|
|
10
10
|
from amd_debug.common import (
|
|
11
11
|
convert_string_to_bool,
|
|
12
12
|
colorize_choices,
|
|
13
|
-
fatal_error,
|
|
14
13
|
is_root,
|
|
15
14
|
relaunch_sudo,
|
|
16
15
|
show_log_info,
|
|
@@ -61,16 +60,15 @@ def display_report_file(fname, fmt) -> None:
|
|
|
61
60
|
return
|
|
62
61
|
user = os.environ.get("SUDO_USER")
|
|
63
62
|
if user:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
fatal_error(f"Failed to open report: {ret}")
|
|
63
|
+
# ensure that xdg tools will know how to display the file
|
|
64
|
+
# (user may need to call tool with sudo -E)
|
|
65
|
+
if os.environ.get("XDG_SESSION_TYPE"):
|
|
66
|
+
subprocess.call(["sudo", "-E", "-u", user, "xdg-open", fname])
|
|
67
|
+
else:
|
|
68
|
+
print(
|
|
69
|
+
"To display report automatically in browser launch tool "
|
|
70
|
+
f"with '-E' argument (Example: sudo -E {sys.argv[0]})"
|
|
71
|
+
)
|
|
74
72
|
|
|
75
73
|
|
|
76
74
|
def get_report_file(report_file, extension) -> str:
|
|
@@ -611,18 +611,12 @@ class TestDisplayReportFile(unittest.TestCase):
|
|
|
611
611
|
self, mock_subprocess_call, mock_env_get, mock_is_root
|
|
612
612
|
):
|
|
613
613
|
"""Test display_report_file when format is html, user is root, and SUDO_USER is set"""
|
|
614
|
-
|
|
615
|
-
display_report_file("/tmp/report.html", "html")
|
|
614
|
+
display_report_file("report.html", "html")
|
|
616
615
|
mock_is_root.assert_called_once()
|
|
617
616
|
mock_env_get.assert_any_call("SUDO_USER")
|
|
617
|
+
mock_env_get.assert_any_call("XDG_SESSION_TYPE")
|
|
618
618
|
mock_subprocess_call.assert_called_once_with(
|
|
619
|
-
[
|
|
620
|
-
"systemd-run",
|
|
621
|
-
"--user",
|
|
622
|
-
"--machine=testuser@.host",
|
|
623
|
-
"xdg-open",
|
|
624
|
-
"/tmp/report.html",
|
|
625
|
-
]
|
|
619
|
+
["sudo", "-E", "-u", "testuser", "xdg-open", "report.html"]
|
|
626
620
|
)
|
|
627
621
|
|
|
628
622
|
@patch("amd_debug.s2idle.is_root", return_value=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{amd_debug_tools-0.2.12 → amd_debug_tools-0.2.13}/src/amd_debug_tools.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|