clean-alluredir command line argument removes only files from alluredir root #470
Description
I'm submitting a ...
- feature request
What is the current behavior?
When --clean-alluredir command line option is specified, it remove all the files from the root level of the alluredir. The problem is, when I copy history folder from already generated html report, which is something that is done if one wants to get historic trend graph in report: https://stackoverflow.com/a/50499775, this history folder is never cleared from report.
What is the expected behavior?
What I would expect is, when this argument is used, to clean whole directory from previous files and folders. I detected that the code for this argument is located in allure-python-commons/src/logger.py, and that fix is as easy as this: https://stackoverflow.com/a/185941.
What is the motivation / use case for changing the behavior?
What I want is to add option in my plugin to specify if I want to get historic trend or not. But with this in complete clean-alluredir option, once I choose not to have history folder in report, it will still be there.
Please tell us about your environment:
- Allure version: 2.13.0
- Test framework: pytest@5.3.0
- Allure adaptor: allure-pytest@2.6.2
Other information
Since I know how to fix this issue easily, I am willing to contribute myself.