| """Fuzzing helper, creates and uses corpus/crash directories. |
| fuzzer.py <fuzzer> <extra fuzzer arguments> |
| THIS_DIR = os.path.abspath(os.path.dirname(__file__)) |
| CORPORA_DIR = os.path.abspath(os.path.join(THIS_DIR, "corpora")) |
| FUZZER_DIR = os.path.abspath(os.path.join(CORPORA_DIR, FUZZER)) |
| if not os.path.isdir(FUZZER_DIR): |
| dd = os.path.abspath(os.path.join(CORPORA_DIR, d)) |
| if not os.path.isdir(dd): |
| dd = os.path.abspath(os.path.join(CORPORA_DIR, d)) |
| _create(FUZZER + "-crash") |
| cmd = ([os.path.abspath(os.path.join(THIS_DIR, FUZZER))] + sys.argv[2:] |
| + ["-artifact_prefix=" + corpora[1] + "/"] + corpora) |
| if __name__ == "__main__": |