Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Sep 23, 2024
1 parent d42d2ae commit 1901364
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/gui/shared/scripts/bdd_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import os
import glob
import subprocess
import getpass
from urllib import request, error
from datetime import datetime

Expand Down Expand Up @@ -53,18 +54,49 @@
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
# Order: 1
@OnScenarioStart
def hook(context):
clear_scenario_config()
check_keyring()


# runs before every scenario
Expand Down

0 comments on commit 1901364

Please sign in to comment.