mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-27 18:36:35 +00:00
[ty] Re-enable fuzzer seeds that are no longer slow (#20937)
This commit is contained in:
parent
a21cde8a5a
commit
baaa8dad3a
2 changed files with 3 additions and 6 deletions
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
|
|
@ -666,7 +666,7 @@ jobs:
|
||||||
- determine_changes
|
- determine_changes
|
||||||
# Only runs on pull requests, since that is the only we way we can find the base version for comparison.
|
# Only runs on pull requests, since that is the only we way we can find the base version for comparison.
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && (needs.determine_changes.outputs.ty == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && (needs.determine_changes.outputs.ty == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
|
||||||
timeout-minutes: 20
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -152,16 +152,13 @@ class FuzzResult:
|
||||||
|
|
||||||
def fuzz_code(seed: Seed, args: ResolvedCliArgs) -> FuzzResult:
|
def fuzz_code(seed: Seed, args: ResolvedCliArgs) -> FuzzResult:
|
||||||
"""Return a `FuzzResult` instance describing the fuzzing result from this seed."""
|
"""Return a `FuzzResult` instance describing the fuzzing result from this seed."""
|
||||||
# TODO debug slowness of these seeds
|
|
||||||
skip_check = seed in {32, 56, 208}
|
|
||||||
|
|
||||||
code = generate_random_code(seed)
|
code = generate_random_code(seed)
|
||||||
bug_found = False
|
bug_found = False
|
||||||
minimizer_callback: Callable[[str], bool] | None = None
|
minimizer_callback: Callable[[str], bool] | None = None
|
||||||
|
|
||||||
if args.baseline_executable_path is None:
|
if args.baseline_executable_path is None:
|
||||||
only_new_bugs = False
|
only_new_bugs = False
|
||||||
if not skip_check and contains_bug(
|
if contains_bug(
|
||||||
code, executable=args.executable, executable_path=args.test_executable_path
|
code, executable=args.executable, executable_path=args.test_executable_path
|
||||||
):
|
):
|
||||||
bug_found = True
|
bug_found = True
|
||||||
|
|
@ -172,7 +169,7 @@ def fuzz_code(seed: Seed, args: ResolvedCliArgs) -> FuzzResult:
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
only_new_bugs = True
|
only_new_bugs = True
|
||||||
if not skip_check and contains_new_bug(
|
if contains_new_bug(
|
||||||
code,
|
code,
|
||||||
executable=args.executable,
|
executable=args.executable,
|
||||||
test_executable_path=args.test_executable_path,
|
test_executable_path=args.test_executable_path,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue