Skip to content

Commit

Permalink
fix: allow non-fuzzing builds in config iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoor committed Aug 15, 2023
1 parent 57d11ab commit 21cff9a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
11 changes: 6 additions & 5 deletions bugmon/evaluator_configs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ def iter_build_flags(cls, bug: EnhancedBug) -> Iterator[BuildFlags]:
"""
# Don't yield and empty build flags object
if not all(flag is False for flag in bug.build_flags):
pass
# Avoid non-fuzzing debug builds now that crashreporter-symbols has been
# removed from taskcluster
if not (bug.build_flags.debug and not bug.build_flags.fuzzing):
yield bug.build_flags
# if not (bug.build_flags.debug and not bug.build_flags.fuzzing):
# yield bug.build_flags

for asan, debug, fuzzing in itertools.product([True, None], repeat=3):

# Avoid non-fuzzing debug builds
if debug and not fuzzing:
continue
# # Avoid non-fuzzing debug builds
# if debug and not fuzzing:
# continue

# Avoid asan-debug builds because they're not used for fuzzing
if asan and debug:
Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ version = "3.1.2"
[tool.poetry.dependencies]
autobisect = "^7.0.2"
bugsy = { git = "https://github.com/AutomatedTester/Bugsy.git" }
fuzzfetch = "^2.2.2"
fuzzfetch = "^2.4.1"
python = "^3.8"
typing-extensions = "^4.2.0"

Expand Down
6 changes: 3 additions & 3 deletions tests/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_bug_configuration_iter_build_flags_001(bug_data):
build_flags = list(BugConfiguration.iter_build_flags(bug))

# Check for the expected number of flag combinations
assert len(build_flags) == 4
assert len(build_flags) == 5
# Check that all results are BuildFlags
assert all(isinstance(x, BuildFlags) for x in build_flags)
# Check for duplicates
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_browser_configuration_iterate_001(bug_data):
Path(tmp_path / "3.js").touch()

bug = EnhancedBug(None, **bug_data)
assert len(list(BrowserConfiguration.iterate(bug, tmp_path))) == 16
assert len(list(BrowserConfiguration.iterate(bug, tmp_path))) == 20


def test_js_configuration_iterate_001(mocker, bug_data):
Expand All @@ -111,4 +111,4 @@ def test_js_configuration_iterate_001(mocker, bug_data):
)
mock.return_value = []
bug = EnhancedBug(None, **bug_data)
assert len(list(JSConfiguration.iterate(bug, tmp_path))) == 12
assert len(list(JSConfiguration.iterate(bug, tmp_path))) == 15

0 comments on commit 21cff9a

Please sign in to comment.