Test suite: make pause() verbosely run pry in the caller's context
This makes pause() print the context it was called from, for example:
From: /home/anonym/src/tails/tails/features/step_definitions/common_steps.rb:444 Object#the_computer_boots:
432: def the_computer_boots
433: enter_boot_menu_cmdline
434: boot_key = @os_loader == 'UEFI' ? 'F10' : 'Return'
435: early_patch = config_bool('EARLY_PATCH') ? ' early_patch=umount' : ''
436: extra_boot_options = $config['EXTRA_BOOT_OPTIONS'] || ''
437: wait_for_remote_shell = @wait_for_remote_shell ? 'autotest_wait_for_remote_shell' : ''
438: @screen.type(' autotest_never_use_this_option ' \
439: ' blacklist=psmouse' \
440: " #{wait_for_remote_shell}" \
441: " #{early_patch} #{@boot_options} #{extra_boot_options}",
442: [boot_key])
443: $vm.wait_until_remote_shell_is_up(5 * 60)
=> 444: pause
445: end
and the REPL operates in the caller's context (binding) so we can access local variables:
[1] pry(#<Object>)> boot_key
=> "Return"
Closes: #20305 (closed)
Edited by anonym