Skip to content

Commit

Permalink
log ps
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Jan 9, 2025
1 parent 1db3294 commit 7b40603
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def main(ctx):
changelog(ctx)
gui_tests = gui_test_pipeline(ctx)

return pipelines + \
gui_tests + \
return gui_tests + \
pipelinesDependsOn(notification(), gui_tests)

def from_secret(name):
Expand Down
45 changes: 42 additions & 3 deletions test/gui/shared/scripts/helpers/SetupClientHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,59 @@ def unlock_keyring():
output = stderr.decode('utf-8')

test.log(f'Keyring status: {output}')
command = 'ps aux | grep keyring | grep -v grep'
stdout, stderr, returncode = run_sys_command(command, True)
pso = ''
if stdout:
pso = stdout.decode('utf-8')
if stderr:
pso = stderr.decode('utf-8')
test.log('PS: -------------------')
test.log(pso)
test.log(':-------------------')

if not output.strip().endswith('false'):
test.log('Unlocking keyring...')
test.log('[INFO] Keyring is locked...')
squish.snooze(5)
# command = 'ps aux | grep dbus | grep -v grep'
# stdout, stderr, returncode = run_sys_command(command, True)
# if stdout:
# output = stdout.decode('utf-8')
# if stderr:
# output = stderr.decode('utf-8')
# test.log(f'dbus ps: {output}')

start_client()
take_screenshot('keyring_locked.png')
test.fail('debug')

password = os.getenv('VNC_PW')
command = f'echo -n "{password}" | gnome-keyring-daemon -r -d --unlock'
stdout, stderr, returncode = run_sys_command(command, True)
if stdout:
output = stdout.decode('utf-8')
if stderr:
output = stderr.decode('utf-8')
test.log(f'unlock: {output}')
squish.snooze(5)
command = 'ps aux | grep keyring | grep -v grep'
stdout, stderr, returncode = run_sys_command(command, True)
if stdout:
output = stdout.decode('utf-8')
if stderr:
output = stderr.decode('utf-8')
test.log('PS: -------------------')
test.log(output)
test.log(':-------------------')

take_screenshot('keyring_unlocked.png')

for ctx in squish.applicationContextList():
# get pid before detaching
pid = ctx.pid
ctx.detach()
wait_until_app_killed(pid)
test.fail('debug')

test.log(f'Keyring status (unlocking): {output}')
if returncode:
test.log(f'Failed to unlock keyring:\n{output}')

Expand Down

0 comments on commit 7b40603

Please sign in to comment.