X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0c6d4ca0c33aa97202e0e94a4a2389cc432597bc..71117e730c4f62458b30af820f51890487b458e4:/fuzz.py?ds=inline diff --git a/fuzz.py b/fuzz.py index 604e6ce..6330c58 100644 --- a/fuzz.py +++ b/fuzz.py @@ -56,4 +56,17 @@ def test_idempotent_any_syntatically_valid_python( if __name__ == "__main__": + # Run tests, including shrinking and reporting any known failures. test_idempotent_any_syntatically_valid_python() + + # If Atheris is available, run coverage-guided fuzzing. + # (if you want only bounded fuzzing, just use `pytest fuzz.py`) + try: + import sys + import atheris + except ImportError: + pass + else: + test = test_idempotent_any_syntatically_valid_python + atheris.Setup(sys.argv, test.hypothesis.fuzz_one_input) + atheris.Fuzz()