Skip to content

Fix GH-18404: Display diff when a single test is run #19400

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandre-daubois
Copy link
Contributor

Fix #18404

@iluuu1994
Copy link
Member

We use this for development quite frequently, and prompting will get quite annoying. The original aim of this file was to be shared with php-src devs, but when you're running a subset of tests I'm not sure this applies any longer? At that point, it seems like you're investigating the issue on your own.

Another option might be to enable the --show-diff option by default, or at least when specifying a subset of tests to run.

@alexandre-daubois
Copy link
Contributor Author

alexandre-daubois commented Aug 7, 2025

Hmm, I see. I'm afraid displaying the diff for a subset would be too much as well, the summary of failed test is useful. Maybe we could display the diff if only one test is ran and fails? I think this use case would really help having a faster debugging workflow

@iluuu1994
Copy link
Member

I'd be ok with this approach. --enable-diff is always enabled in my environment, I don't find it particularly noisy. run-tests.php is very noisy anyway. Somewhat related: #16443

@alexandre-daubois alexandre-daubois changed the title Fix GH-18404: Always prompt to save test report Fix GH-18404: Display diff when a single test is run Aug 8, 2025
@alexandre-daubois
Copy link
Contributor Author

Updated accordingly: diff is displayed when one only one test is run and fails.

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.

run-tests.php doesn't create test results if directories are passed
2 participants