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

Make CVise understand files in a filesystem tree #132

Closed
wants to merge 1 commit into from

Conversation

dmcdougall
Copy link
Contributor

@dmcdougall dmcdougall commented Apr 13, 2024

CVise now understands test cases that live in subdirectories in a filesystem tree.

The behaviour is to simply create the directories needed in tmpfs. And interestingness checks are already expected to handle paths to test cases.

For example, a user can now say:

cvise <args> ./interesting.sh dir1/file1 file2 dir2/file1 dir3/file3

This feature ought to make it easier to minimise more complicated situations involving larger applications that create complex out-of-source build trees where:

  1. there are several files in different directories; and
  2. files that have the same name but live in different directories.

There is some extra historical context behind this pull request. I had initially made an inquiry about copying extra folders in #110. In that issue, however, CVise didn't really understand that the directory is really part of the test case. What I'm trying to do here is give the user the opportunity to minimise test cases without having to extract them all from an existing and potentially complex directory hierarchy.

I'm very open to criticism on this contribution, so please feel free to tear it apart. Or if this contribution isn't something that the community is interested in, I'm happy for it to be rejected.

CVise now understands test cases that live in subdirectories in a
filesystem tree.

The behaviour is to simply create the directories needed in tmpfs.
And interestingness checks are already expected to handle paths to
test cases.

For example, a user can now say:

cvise <args> ./interesting.sh dir1/file1 file2 dir2/file1 dir3/file3

This feature ought to make it easier to minimise more complicated
situations involving larger applications that create complex
out-of-source build trees where:

1. there are several files in different directories; and
2. files that have the same name but live in different directories.
@marxin
Copy link
Owner

marxin commented Apr 14, 2024

Thanks for the pull request. I decided to use this opportunity and make a bigger refactoring related to pathlib in the testing.py file. Having that, I added the requested functionality. Please test my #133, does it work for you?

@marxin marxin closed this Apr 14, 2024
@dmcdougall dmcdougall deleted the preserve_dir_tree branch April 14, 2024 17:24
@dmcdougall
Copy link
Contributor Author

I added the requested functionality

Thank you.

Please test my #133

Will do. Thanks again.

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.

None yet

2 participants