Skip to content

Add --progress option to run-tests.php #9255

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

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

iluuu1994
Copy link
Member

The option is enabled in CLI but disabled in CI by default. Previously,
adding the -g argument would disable progress, even locally.

@iluuu1994 iluuu1994 force-pushed the run-tests-show-progress-option branch from 552db6b to e12a0b7 Compare August 5, 2022 13:08
@iluuu1994 iluuu1994 requested a review from cmb69 August 5, 2022 15:12
@cmb69
Copy link
Member

cmb69 commented Aug 10, 2022

Previously, adding the -g argument would disable progress, even locally.

Hmm, doesn't that depend on the values passed to -g? I mean -g PASS,FAIL,XFAIL,XLEAK,SKIP,BORK,WARN,LEAK,REDIRECT should show all tests.

@iluuu1994
Copy link
Member Author

@cmb69 By progress I mean the following:

TEST 1/1000 [14/14 concurrent test workers running]

The test results are shown depending on what you specify with -g, as before.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

Ah, I see! Then it makes sense to me, but I wouldn't bake-in CI detection, but rather change the CI scripts to pass the --no-progress option (the BC break seems to be acceptable).

@iluuu1994
Copy link
Member Author

@cmb69 Do you have concerns with auto-disabling progress in CI? It would be useful there but only if we massively turn down the frequency, maybe every minute or so. Most CIs do not support \r without \n and thus will just fill the logs.

@cmb69
Copy link
Member

cmb69 commented Aug 10, 2022

Do you have concerns with auto-disabling progress in CI?

Not generally, but I don't like a hard-coded list in run-tests.php. There is no chance to catch all CI providers anyway.

@iluuu1994
Copy link
Member Author

@cmb69 Isn't 95% better than nothing? If a specific CI isn't covered one can pass the --no-progress manually. This is how most tools seem to use it. Either way, I am not set on it, I can remove it 🙂

@krakjoe
Copy link
Member

krakjoe commented Aug 10, 2022

Isn't 95% better than nothing?

I have some words ...

It would be nice if the concerns of run-tests.php were restricted to running tests, it's already a very messy place to make changes.

How run-tests is configured should be determined by the caller of the script by the options we provide.

Note that, we already went down the special casing route with travis-ci, now the script is littered with special cases for travis, a thing we only use for exotics. The best thing to do now, is remove this special casing and move the configuration to calls from travis scripts.

The best thing to do moving forward, imo, is avoid adding more of these special cases, even if they look useful, even when they cover the 95% :)

@iluuu1994
Copy link
Member Author

Works for me, I'll remove it then :)

Previously, adding the -g argument would disable progress, even locally.
Now it needs to be disabled explicitly.
@iluuu1994 iluuu1994 force-pushed the run-tests-show-progress-option branch from e12a0b7 to a569939 Compare August 11, 2022 08:22
@iluuu1994 iluuu1994 merged commit 0028c24 into php:master Aug 11, 2022
cmb69 added a commit to cmb69/php-ftw that referenced this pull request Jan 17, 2023
Without that option, we get progress display now[1], which is certainly
not desired for CI.

[1] <php/php-src#9255>
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.

3 participants