Skip to content
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

Fix sanitization of backtraces in tests. #122

Merged
merged 6 commits into from
Feb 29, 2024
Merged

Fix sanitization of backtraces in tests. #122

merged 6 commits into from
Feb 29, 2024

Conversation

doxavore
Copy link
Member

This was chopping off multi-line output on linux, but not on macOS. It's possible macOS/nix was also unintentionally cutting off output (and why it was previously generated on macOS).

@doxavore doxavore self-assigned this Feb 29, 2024
@@ -134,7 +134,7 @@ def sanitize_backtrace(output)
.gsub(%r{\\n.+/rspec-abq}, "/rspec-abq") # get rid of prefixes to working directory in escaped strings
.gsub(%r{^\s+# [^\s]+/(?:bin|bundler|rubygems|gems)/.+$\n}, "") # get rid of backtraces outside of rspec-abq
.gsub(%r{^\s*"[^\s]+/(?:bin|bundler|rubygems|gems)/.+",?$}, "") # get rid of backtraces outside of rspec-abq in pretty JSON
.gsub(%r{\\n\s+(?:\\u001b\[36m)?# [^\s]+/(?:bin|bundler|rubygems|gems)/.+\\n}, "") # get rid of backtraces outside of rspec-abq in escaped strings
.gsub(%r{\\n\s+(?:\\e\[36m)?# [^\s]+/(?:bin|bundler|rubygems|gems)/.+$\\n}, "") # get rid of backtraces outside of rspec-abq in escaped strings
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only "material" change (and it's in tests).

@ayazhafiz ayazhafiz merged commit faccf09 into main Feb 29, 2024
27 checks passed
@ayazhafiz ayazhafiz deleted the doug/local-pass branch February 29, 2024 22:54
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