Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-ac committed Dec 16, 2024
1 parent d8f9e21 commit 10426b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/other-bots/chromium-tests-syncer/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,15 @@ def create_gecko_tests_directory(tests_directory, gecko_checkout_subdirectory,


def create_fuzzilli_tests_directory(tests_directory):
"""Create Fuzzilli tests directory from the autozilli GCS archives."""
logs.info('Syncing fuzzilli tests.')
fuzzilli_tests_directory = os.path.join(tests_directory, 'fuzzilli')
remote_archive_tmpl = 'gs://autozilli/autozilli-%d.tgz'

# Ensure we have an empty directory with no leftovers from a previous run.
shell.remove_directory(fuzzilli_tests_directory, recreate=True)

def filter(member, path):
def filter_members(member, path):
# We only need JS files and the settings.json from the archive.
if member.name.endswith('fzil') or member.name.startswith('fuzzdir/stats'):
return None
Expand All @@ -232,7 +233,7 @@ def filter(member, path):

# Extract relevant files.
with tarfile.open(local_archive) as tar:
tar.extractall(path=fuzzilli_tests_directory, filter=filter)
tar.extractall(path=fuzzilli_tests_directory, filter=filter_members)

# Clean up.
os.rename(
Expand Down

0 comments on commit 10426b9

Please sign in to comment.