mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
fuzz: test_runner: Better error message when built with afl
This commit is contained in:
parent
fa7ca8ef58
commit
fa535af92c
@ -72,17 +72,22 @@ def main():
|
|||||||
logging.error("No fuzz targets selected")
|
logging.error("No fuzz targets selected")
|
||||||
logging.info("Fuzz targets selected: {}".format(test_list_selection))
|
logging.info("Fuzz targets selected: {}".format(test_list_selection))
|
||||||
|
|
||||||
help_output = subprocess.run(
|
try:
|
||||||
args=[
|
help_output = subprocess.run(
|
||||||
os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', test_list_selection[0]),
|
args=[
|
||||||
'-help=1',
|
os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', test_list_selection[0]),
|
||||||
],
|
'-help=1',
|
||||||
check=True,
|
],
|
||||||
stderr=subprocess.PIPE,
|
timeout=1,
|
||||||
universal_newlines=True,
|
check=True,
|
||||||
).stderr
|
stderr=subprocess.PIPE,
|
||||||
if "libFuzzer" not in help_output:
|
universal_newlines=True,
|
||||||
logging.error("Must be built with libFuzzer")
|
).stderr
|
||||||
|
if "libFuzzer" not in help_output:
|
||||||
|
logging.error("Must be built with libFuzzer")
|
||||||
|
sys.exit(1)
|
||||||
|
except subprocess.TimeoutExpired:
|
||||||
|
logging.error("subprocess timed out: Currently only libFuzzer is supported")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
run_once(
|
run_once(
|
||||||
|
Loading…
Reference in New Issue
Block a user