This commit is contained in:
Yakov Olkhovskiy 2024-07-15 19:10:07 +00:00
parent 97c9739abc
commit 5361ade8e7
5 changed files with 7 additions and 20 deletions

View File

@ -39,7 +39,7 @@ ENV FUZZER_ARGS="-max_total_time=60"
SHELL ["/bin/bash", "-c"]
CMD set -o pipefail \
&& timeout -s 9 1h /run_libfuzzer.py 2>&1 | ts "$(printf '%%Y-%%m-%%d %%H:%%M:%%S\t')" | tee main.log
&& timeout -s 9 1h ./utils/libfuzzer/runner.py 2>&1 | ts "$(printf '%%Y-%%m-%%d %%H:%%M:%%S\t')" | tee main.log
# docker run --network=host --volume <workspace>:/workspace -e PR_TO_TEST=<> -e SHA_TO_TEST=<> clickhouse/libfuzzer

View File

@ -1,12 +0,0 @@
#!/usr/bin/env python3
import runner
def main():
runner.run()
exit(0)
if __name__ == "__main__":
main()

View File

@ -275,7 +275,5 @@ def download_fuzzers(
check_name,
reports_path,
result_path,
lambda x: x.endswith(
("_fuzzer", ".dict", ".options", "_seed_corpus.zip", "runner.py")
),
lambda x: x.endswith(("_fuzzer", ".dict", ".options", "_seed_corpus.zip")),
)

View File

@ -1,8 +1,5 @@
#!/bin/bash -eu
# copy runner
cp $SRC/utils/libfuzzer/runner.py $OUT/
# copy fuzzer options and dictionaries
cp $SRC/tests/fuzz/*.dict $OUT/
cp $SRC/tests/fuzz/*.options $OUT/

View File

@ -69,7 +69,7 @@ def run_fuzzer(fuzzer: str):
subprocess.check_call(cmd_line, shell=True)
def run():
def main():
logging.basicConfig(level=logging.INFO)
subprocess.check_call("ls -al", shell=True)
@ -78,3 +78,7 @@ def run():
for fuzzer in current.iterdir():
if (current / fuzzer).is_file() and os.access(current / fuzzer, os.X_OK):
run_fuzzer(fuzzer)
if __name__ == "__main__":
main()