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

Support file pattern argument #4

Closed
robin-aws opened this issue Mar 11, 2022 · 6 comments · Fixed by #5
Closed

Support file pattern argument #4

robin-aws opened this issue Mar 11, 2022 · 6 comments · Fixed by #5

Comments

@robin-aws
Copy link
Member

The current version relies on pre-processing to collect the set of CSV files and provide them as individual arguments, but this might hit the maximum command length limit if there are a lot of them. I didn't want to take on the work of binding external utilities to search file systems in the initial version, but this could be a scalability issue in the near future. Perhaps dafny-lang/libraries will gain some I/O facilities soon. :)

@seebees
Copy link
Collaborator

seebees commented Mar 11, 2022

I would vote that we make a separate library for I/O.
But I guess that really depends on how we plan on managing packages...

@robin-aws
Copy link
Member Author

Yup, I'm almost inclined to consider each individual file in dafny-lang/libraries as a separate "library", especially since customizing the verification to provide /noNLarith on a per-file basis is current necessary.

@cpitclaudel
Copy link
Member

Could you just concatenate all the CSVs into one file and pass it to the report generator?

@robin-aws
Copy link
Member Author

Could you just concatenate all the CSVs into one file and pass it to the report generator?

Almost, but each CSV file has a header row to label the fields, i.e. TestResult.DisplayName,TestResult.Outcome,....

I ended up keeping things simple by accepting directory paths as well and internally doing a **/TestResults/*.csv globbing search: #5 :)

@cpitclaudel
Copy link
Member

I was thinking of something like this: find . -name '*.csv' -exec head -n 1 {} -quit \; ; find . -name *.csv -exec tail -q -n +2 {} +. An equivalent program in C# is good too!

@robin-aws
Copy link
Member Author

Touché. :) But yeah, I'm happier with not depending on any shell functionality for maximum portability of the features this tool is trying to provide!

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 a pull request may close this issue.

3 participants