trailofbits/manticore

Cleanup Manticore workspace when a test passes

Open

#1617 opened on Feb 21, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Python (3,469 stars) (481 forks)batch import
good first issuetesting

Description

It's nice if testing doesn't produce unnecessary artifacts after running with success but keeps relevant info on fail for further inspection.

Pytest should have a nice way of creating fixtures that can post-process a test based on whether it failed or not https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures

If a test fails, then keep the Manticore workspace, and, if possible, print the associated failed test's workspace directory in the pytest output to know where the user should look.

If a test passes, then remove the Manticore workspace.

Since some of our tests are structured differently, the exact implementation will likely look different for different tests.

@reaperhulk Do you have any comments, suggestions, or references for doing something like this?

Contributor guide