Skip to content

WIP: Kill a debuggee process fastly if a test fails #933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ono-max
Copy link
Member

@ono-max ono-max commented Mar 20, 2023

Thanks for your Pull Request 🎉

Please follow these instructions to help us review it more efficiently:

  • Add references of related issues/PRs in the description if available.
  • If you're updating the readme file, make sure you followed the instruction here.

Description

Describe your changes:

@ono-max ono-max changed the title Kill a debuggee process fastly if a test fails WIP: Kill a debuggee process fastly if a test fails Mar 20, 2023
kill_safely pid, :debugger, test_info, sec: 0
end
if name = test_info.failed_process && !is_fail
flunk(create_message("Expected the #{name} program to finish", test_info))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we only enter this case when is_fail is false, wouldn't name always be remote 🤔

@@ -195,12 +195,20 @@ def run_test_scenario cmd, test_info
# result of `gets` return this exception in some platform
rescue Timeout::Error
assert_block(create_message("TIMEOUT ERROR (#{TIMEOUT_SEC} sec)", test_info)) { false }
rescue Test::Unit::AssertionFailedError
is_fail = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we align the name with what we have in protocol test case (is_assertion_failure)?

# kill debug console process
read.close
write.close
kill_safely pid, :debugger, test_info
if is_fail == true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The == true seems to be redundant?

@ko1 ko1 mentioned this pull request Mar 24, 2023
@ono-max ono-max closed this Apr 2, 2023
@ono-max ono-max deleted the patch-227 branch April 2, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants