From 190136471be8b965027b9f5a4079e749452ee971 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Fri, 20 Sep 2024 15:35:07 +0545 Subject: [PATCH] debug --- test/gui/shared/scripts/bdd_hooks.py | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/gui/shared/scripts/bdd_hooks.py b/test/gui/shared/scripts/bdd_hooks.py index 6fa8ba7a710..3c00edab298 100644 --- a/test/gui/shared/scripts/bdd_hooks.py +++ b/test/gui/shared/scripts/bdd_hooks.py @@ -19,6 +19,7 @@ import os import glob import subprocess +import getpass from urllib import request, error from datetime import datetime @@ -53,11 +54,41 @@ PREVIOUS_ERROR_RESULT_COUNT = 0 +def check_keyring(): + res = subprocess.run( + [ + "busctl", + "--user", + "get-property", + "org.freedesktop.secrets", + "/org/freedesktop/secrets/collection/login", + "org.freedesktop.Secret.Collection", + "Locked", + ], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + check=False, + ) + test.log("######## keyring status") + test.log(getpass.getuser()) + test.log(str(os.getenv("DBUS_SESSION_BUS_ADDRESS"))) + test.log(str(os.getenv("XDG_RUNTIME_DIR"))) + test.log(str(res)) + if res.stdout: + out = res.stdout.decode("utf-8") + test.log(out) + if res.stderr: + err = res.stderr.decode("utf-8") + test.log(err) + test.log("######## keyring status") + + # runs before a feature # Order: 1 @OnFeatureStart def hook(context): init_config() + check_keyring() # runs before every scenario @@ -65,6 +96,7 @@ def hook(context): @OnScenarioStart def hook(context): clear_scenario_config() + check_keyring() # runs before every scenario