mirror of
https://github.com/facebook/zstd.git
synced 2025-08-08 17:22:10 +03:00
[fuzz] Small changes for oss-fuzz integration
This commit is contained in:
2
tests/fuzz/default.options
Normal file
2
tests/fuzz/default.options
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[libfuzzer]
|
||||||
|
max_len = 8192
|
@@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# ################################################################
|
# ################################################################
|
||||||
# Copyright (c) 2016-present, Facebook, Inc.
|
# Copyright (c) 2016-present, Facebook, Inc.
|
||||||
@@ -757,6 +757,10 @@ def zip_cmd(args):
|
|||||||
subprocess.check_call(cmd + seeds)
|
subprocess.check_call(cmd + seeds)
|
||||||
|
|
||||||
|
|
||||||
|
def list_cmd(args):
|
||||||
|
print("\n".join(TARGETS))
|
||||||
|
|
||||||
|
|
||||||
def short_help(args):
|
def short_help(args):
|
||||||
name = args[0]
|
name = args[0]
|
||||||
print("Usage: {} [OPTIONS] COMMAND [ARGS]...\n".format(name))
|
print("Usage: {} [OPTIONS] COMMAND [ARGS]...\n".format(name))
|
||||||
@@ -776,6 +780,7 @@ def help(args):
|
|||||||
print("\tgen\t\tGenerate a seed corpus for a fuzzer")
|
print("\tgen\t\tGenerate a seed corpus for a fuzzer")
|
||||||
print("\tminimize\tMinimize the test corpora")
|
print("\tminimize\tMinimize the test corpora")
|
||||||
print("\tzip\t\tZip the minimized corpora up")
|
print("\tzip\t\tZip the minimized corpora up")
|
||||||
|
print("\tlist\t\tList the available targets")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -802,6 +807,8 @@ def main():
|
|||||||
return minimize(args)
|
return minimize(args)
|
||||||
if command == "zip":
|
if command == "zip":
|
||||||
return zip_cmd(args)
|
return zip_cmd(args)
|
||||||
|
if command == "list":
|
||||||
|
return list_cmd(args)
|
||||||
short_help(args)
|
short_help(args)
|
||||||
print("Error: No such command {} (pass -h for help)".format(command))
|
print("Error: No such command {} (pass -h for help)".format(command))
|
||||||
return 1
|
return 1
|
||||||
|
Reference in New Issue
Block a user