4444 Path ("Tools/build/regen-configure.sh" ),
4545})
4646
47- SUFFIXES_C_OR_CPP = frozenset ({".c" , ".h" , ".cpp" })
4847SUFFIXES_DOCUMENTATION = frozenset ({".rst" , ".md" })
4948
5049ANDROID_DIRS = frozenset ({"Android" })
5150MACOS_DIRS = frozenset ({"Mac" })
5251WASI_DIRS = frozenset ({Path ("Tools" , "wasm" )})
5352
54- LIBRARY_FUZZER_PATHS = frozenset ({
55- # All C/CPP fuzzers.
56- Path ("configure" ),
57- Path (".github/workflows/reusable-cifuzz.yml" ),
58- # ast
59- Path ("Lib/ast.py" ),
60- Path ("Python/ast.c" ),
61- # configparser
62- Path ("Lib/configparser.py" ),
63- # csv
64- Path ("Lib/csv.py" ),
65- Path ("Modules/_csv.c" ),
66- # decode
67- Path ("Lib/encodings/" ),
68- Path ("Modules/_codecsmodule.c" ),
69- Path ("Modules/cjkcodecs/" ),
70- Path ("Modules/unicodedata*" ),
71- # difflib
72- Path ("Lib/difflib.py" ),
73- # email
74- Path ("Lib/email/" ),
75- # html
76- Path ("Lib/html/" ),
77- Path ("Lib/_markupbase.py" ),
78- # http.client
79- Path ("Lib/http/client.py" ),
80- # json
81- Path ("Lib/json/" ),
82- Path ("Modules/_json.c" ),
83- # plist
84- Path ("Lib/plistlib.py" ),
85- # re
86- Path ("Lib/re/" ),
87- Path ("Modules/_sre/" ),
88- # tarfile
89- Path ("Lib/tarfile.py" ),
90- # tomllib
91- Path ("Modules/tomllib/" ),
92- # xml
93- Path ("Lib/xml/" ),
94- Path ("Lib/_markupbase.py" ),
95- Path ("Modules/expat/" ),
96- Path ("Modules/pyexpat.c" ),
97- # zipfile
98- Path ("Lib/zipfile/" ),
99- # zoneinfo
100- Path ("Lib/zoneinfo/" ),
101- Path ("Modules/_zoneinfo.c" ),
102- })
103-
10453
10554@dataclass (kw_only = True , slots = True )
10655class Outputs :
10756 run_android : bool = False
108- run_ci_fuzz : bool = False
109- run_ci_fuzz_stdlib : bool = False
11057 run_docs : bool = False
11158 run_macos : bool = False
11259 run_tests : bool = False
@@ -139,16 +86,6 @@ def compute_changes() -> None:
13986 if outputs .run_windows_tests :
14087 print ("Run Windows tests" )
14188
142- if outputs .run_ci_fuzz :
143- print ("Run CIFuzz tests" )
144- else :
145- print ("Branch too old for CIFuzz tests; or no C files were changed" )
146-
147- if outputs .run_ci_fuzz_stdlib :
148- print ("Run CIFuzz tests for stdlib" )
149- else :
150- print ("Branch too old for CIFuzz tests; or no stdlib files were changed" )
151-
15289 if outputs .run_docs :
15390 print ("Build documentation" )
15491
@@ -197,18 +134,8 @@ def get_file_platform(file: Path) -> str | None:
197134 return None
198135
199136
200- def is_fuzzable_library_file (file : Path ) -> bool :
201- return any (
202- (file .is_relative_to (needs_fuzz ) and needs_fuzz .is_dir ())
203- or (file == needs_fuzz and file .is_file ())
204- for needs_fuzz in LIBRARY_FUZZER_PATHS
205- )
206-
207-
208137def process_changed_files (changed_files : Set [Path ]) -> Outputs :
209138 run_tests = False
210- run_ci_fuzz = False
211- run_ci_fuzz_stdlib = False
212139 run_docs = False
213140 run_windows_tests = False
214141 run_windows_msi = False
@@ -222,8 +149,8 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
222149 doc_file = file .suffix in SUFFIXES_DOCUMENTATION or doc_or_misc
223150
224151 if file .parent == GITHUB_WORKFLOWS_PATH :
225- if file .name in ( "build.yml" , "reusable-cifuzz.yml" ) :
226- run_tests = run_ci_fuzz = run_ci_fuzz_stdlib = run_windows_tests = True
152+ if file .name == "build.yml" :
153+ run_tests = run_windows_tests = True
227154 has_platform_specific_change = False
228155 continue
229156 if file .name == "reusable-docs.yml" :
@@ -256,18 +183,6 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
256183 if file not in UNIX_BUILD_SYSTEM_FILE_NAMES :
257184 run_windows_tests = True
258185
259- # The fuzz tests are pretty slow so they are executed only for PRs
260- # changing relevant files.
261- if file .suffix in SUFFIXES_C_OR_CPP :
262- run_ci_fuzz = True
263- if file .parts [:2 ] in {
264- ("configure" ,),
265- ("Modules" , "_xxtestfuzz" ),
266- }:
267- run_ci_fuzz = True
268- if not run_ci_fuzz_stdlib and is_fuzzable_library_file (file ):
269- run_ci_fuzz_stdlib = True
270-
271186 # Check for changed documentation-related files
272187 if doc_file :
273188 run_docs = True
@@ -296,8 +211,6 @@ def process_changed_files(changed_files: Set[Path]) -> Outputs:
296211
297212 return Outputs (
298213 run_android = run_android ,
299- run_ci_fuzz = run_ci_fuzz ,
300- run_ci_fuzz_stdlib = run_ci_fuzz_stdlib ,
301214 run_docs = run_docs ,
302215 run_macos = run_macos ,
303216 run_tests = run_tests ,
@@ -312,10 +225,6 @@ def process_target_branch(outputs: Outputs, git_branch: str) -> Outputs:
312225 if not git_branch :
313226 outputs .run_tests = True
314227
315- # CIFuzz / OSS-Fuzz compatibility with older branches may be broken.
316- if git_branch != GITHUB_DEFAULT_BRANCH :
317- outputs .run_ci_fuzz = False
318-
319228 if os .environ .get ("GITHUB_EVENT_NAME" , "" ).lower () == "workflow_dispatch" :
320229 outputs .run_docs = True
321230 outputs .run_windows_msi = True
0 commit comments