-
Notifications
You must be signed in to change notification settings - Fork 99
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
Run all tests with user-specified runner #1046
Conversation
Summary of updated behavior:
cc: @gnikit @henilp105 @fortran-lang/fpm @jacobwilliams @urbanjost |
@jacobwilliams @lockstockandbarrel there are no outstanding comments. So I will wait for one or two days, and then merge. |
@perazz is this list of commands and actions up to date? |
@gnikit exactly |
Ok cool. Then I have some thoughts on this, about name expectations and ease of use. I'll try and post them later today. |
The only thing that doesn't sit right with me is that
describe actions running and testing, but when one does
Usage of These are my 2cents @perazz and @urbanjost let me know what you think. |
The former logic was: you wanted to run all tests (simple programs) by default to ease CI runs, while if you have many apps or examples, in general you should know what you're trying to run (they should be more complete programs etc.) However, I also like the consistency approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work @perazz
Some thoughts and features I recall being debated in the past ..
should running all be a consistent default?
running by globbing is supported. Should regex be allowed too?
should running by name allow globbing per name? Currently (I think) globbing is a single expression (need to confirm, not on platform a moment)
running by list of names
listing available choices gives short names with --list; but --runner with no command gives long ger names. Is there some better choice or is that OK?
launching via runner command should pick same targets as without --runner option
all messages going to stderr so, for example, a list can be piped into another command should be expected behavior
complementing that shouldl be a quiet mode so only program output or listing is produced
option to pause between programs
deciding if a program termination should stop execution of a list of programs
deciding if compilation failure (of perhaps a platform-specific code) should stop compilation and loading of other applications
getting a tally of program exit codes, particularly for test (allowing it to act as a unit test framework)
allowing specifying other directories to auto-build and auto-run by specifying a directory like
-dir test|app|example|anything_I_want or if a name contains a slash or backslash
should examples be built via --example or as a name like test? That is, why "fpm test" but
"fpm --example"?
Is --all now redundant? It is clearest what the expected behavior is.
IMO I like the consistency and function of all; particularly since the current behavior is to run if only one program found, list if there are choices. It is not bad but I think the default being to run all is better. Out of the things that came to mind it is possible to get fancy with --runner and create a pause between programs but I think I would still like a switch specifically for that; and --example being changed to simply example is probably a big enough change that there would be calls for backward compatibility; but something like "fpm mydir/" or fpm name(s) --dir mydir would be nice.I have codes just for measuring timing and performance I do not always want to run in my test directory, and so I use globbing and a pattern of names currently and it would be nice to just be able to type "fpm test" and just run the unit and regression tests; and fpm timing/ to just build/run programs in the timing/ directory, for example.
Just food for thought. I like a change towards consistency so I am good with the change; not sure if it will considered disruptive or not.
… On 06/19/2024 5:26 AM EDT gnikit ***@***.***> wrote:
Ok cool. Then I have some thoughts on this, about name expectations and ease of use. I'll try and post them later today.
—
Reply to this email directly, view it on GitHub #1046 (comment), or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDWN3L5LW6NMZQB7Q6HMV3ZIFFFRAVCNFSM6AAAAABI5OS6XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZYGIYDAMJWGM.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@urbanjost thanks, there's a lot of ideas here. I will merge this PR as they deserve separate investigation. I like these two the most:
|
Fix #1041
@urbanjost what do you think?