Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexB52 committed Jan 9, 2025
1 parent eb2c93a commit 2c56a77
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions exe/retest
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ program = Retest::Program.new(
runner: runner
)

# Signal.trap(:QUIT) do
# runner.interrupt_run
# end

Signal.trap(:INT) do
if !runner.interrupt_run
puts "Goodbye"
Expand Down
7 changes: 1 addition & 6 deletions lib/retest/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def initialize(command, stdout: $stdout)
def interrupt_run
return false unless @pid

r = Process.kill('INT', @pid)
puts "killing: #{r}"
r
Process.kill('INT', @pid)
rescue Errno::ESRCH
false
end
Expand Down Expand Up @@ -97,11 +95,8 @@ def sync(added:, removed:)
def system_run(command)
log("\n")
@pid = spawn(command)
# @pgid = Process.getpgid(@pid)
puts "Runner pid: #{@pid}"
Process.wait
@pid = nil
# @pgid = nil
result = $?.exitstatus&.zero? ? :tests_pass : :tests_fail
changed
notify_observers(result)
Expand Down

0 comments on commit 2c56a77

Please sign in to comment.