Skip to content

Commit 6a062bb

Browse files
committed
remove run command
1 parent 7a1f248 commit 6a062bb

1 file changed

Lines changed: 0 additions & 69 deletions

File tree

fuzz/run_fuzz_all_targets.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -27,75 +27,6 @@
2727
from returns.maybe import Maybe, Nothing, Some
2828
from command_util import run_command_fuzz_all_targets as run_command
2929

30-
# def run_command(
31-
# cmd: str,
32-
# log_msg: str,
33-
# logger: logging.Logger,
34-
# allowed_exit_codes: Maybe[list[int]] = Nothing,
35-
# timeout: int = 3600 # Default 1-hour timeout
36-
# ) -> bool:
37-
# """Execute commands with real-time logging and precise error handling"""
38-
# allowed_codes = allowed_exit_codes.value_or([])
39-
# logger.info(f"▶️ {log_msg}...")
40-
# logger.debug(f" $ {cmd}")
41-
42-
# process = None
43-
# try:
44-
# process = subprocess.Popen(
45-
# cmd,
46-
# shell=True,
47-
# stdout=subprocess.PIPE,
48-
# stderr=subprocess.STDOUT,
49-
# text=True,
50-
# encoding="utf-8",
51-
# errors="replace"
52-
# )
53-
54-
# start_time = time.time()
55-
# while process.poll() is None:
56-
# if time.time() - start_time > timeout:
57-
# logger.error(f"⌛ Command timed out after {timeout} seconds")
58-
# process.terminate()
59-
# try:
60-
# process.wait(timeout=5)
61-
# except subprocess.TimeoutExpired:
62-
# process.kill()
63-
# return False
64-
65-
# if process.stdout:
66-
# line = process.stdout.readline()
67-
# if line:
68-
# logger.debug(line.strip())
69-
# else:
70-
# time.sleep(0.1)
71-
72-
# exit_code = process.returncode
73-
# if exit_code not in [0, *allowed_codes]:
74-
# logger.error(f"❌ Command execution failed, exit code: {exit_code}")
75-
# return False
76-
# return True
77-
78-
# except FileNotFoundError:
79-
# logger.error(f"🔍 Command not found: {cmd.split()[0]}")
80-
# return False
81-
# except PermissionError:
82-
# logger.error(f"🔒 Insufficient permissions to execute command: {cmd}")
83-
# return False
84-
# except subprocess.SubprocessError as e:
85-
# logger.exception(f"💥 Subprocess error: {e}")
86-
# return False
87-
# except OSError as e:
88-
# logger.exception(f"💥 Operating system error during command execution: {e}")
89-
# return False
90-
# finally:
91-
# if process and process.poll() is None:
92-
# try:
93-
# process.terminate()
94-
# process.wait(timeout=5)
95-
# except Exception:
96-
# pass
97-
98-
9930
def discover_targets(project_name: str, oss_fuzz_dir: Path, logger: logging.Logger) -> list[str]:
10031
"""Discover fuzz targets for a project (starting with 'fuzz_', no extension, and executable)"""
10132
out_dir = oss_fuzz_dir / "build" / "out" / project_name

0 commit comments

Comments
 (0)