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

Move tests into separate tests/ directory #11

Closed
jhachenbergerSIT opened this issue Sep 2, 2019 · 3 comments · Fixed by #15
Closed

Move tests into separate tests/ directory #11

jhachenbergerSIT opened this issue Sep 2, 2019 · 3 comments · Fixed by #15

Comments

@jhachenbergerSIT
Copy link
Contributor

In order to improve the project structure, I would propose to put all test-related files (e.g. correct-results*.{txt,csv,html}, test*.{c,patch} ) into a subdirectory (e.g.tests/). Eventually, putting the relevant makefile parts into a separate makefile within the test directory would even further improve the clarity of the overall project (or at least of the makefile).

What do you think about this change? As soon as you agree to the general idea, I will create a pull-request.

This approach seems to be backed by PyPA and most answers on SO tend to suggest a similar structure for Python-based projects:

@david-a-wheeler
Copy link
Owner

This does make sense. There are multiple tests, so moving them into a separate subdirectory is reasonable. I thought about doing that early on, but early on there were few tests (so why bother)... but that argument is no longer true.

@david-a-wheeler
Copy link
Owner

A PR would be greatly appreciated!

jhachenbergerSIT added a commit to jhachenbergerSIT/flawfinder that referenced this issue Sep 23, 2019
In order to keep all test-related files within one folder,
this commit creates a new folder 'test/', moves the
test-related files into it and intrdocues a second makefile
within this folder dedicated to run the tests.
The original makefile still contains a 'test' target, but simply
delegates this task to the second makefile.

(fixes david-a-wheeler#11)

Signed-off-by: Julien Hachenberger <julien.hachenberger@sit.fraunhofer.de>
jhachenbergerSIT added a commit to jhachenbergerSIT/flawfinder that referenced this issue Sep 23, 2019
In order to keep all test-related files within one folder,
this commit creates a new folder 'test/', moves the
test-related files into it and intrdocues a second makefile
within this folder dedicated to run the tests.
The original makefile still contains a 'test' target, but simply
delegates this task to the second makefile.

(fixes david-a-wheeler#11)

Signed-off-by: Julien Hachenberger <julien.hachenberger@sit.fraunhofer.de>
@jhachenbergerSIT
Copy link
Contributor Author

Thanks for your feedback (and the feedback to the other issues)!

I created a PR.

And sorry for the commit duplicate listed here. I forgot to rebase my feature branch (since I already had done the work some time ago) before pushing and now had to force push the feature branch again. And now, I don't know how to remove the "old" commit from showing up here.

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.

2 participants