-
Notifications
You must be signed in to change notification settings - Fork 600
[tests-syncer] Rename fuzz files in the whole archive #5164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| def rename_testcase_files(directory): | ||
| # Rename all fuzzed testcase files as regular files. | ||
| for root, _, files in os.walk(directory): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moved from above 1:1.
| 'LayoutTests') | ||
|
|
||
| test_folders = [ | ||
| 'CrashTests', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The crash tests are included here, so this preserves the functionality we had before, where we called the renaming loop within the unpack_crash_testcases function.
|
Could you run |
| raise RuntimeError(f'Failed to rename testcase {file_path}') from e | ||
|
|
||
|
|
||
| def clean_up_filenames(tests_directory, test_folders): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this function being called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :) - it's called now
4bf921d to
0f96ecc
Compare
javanlacerda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any unit tests that could be created for checking this change?
Not that I know of. If there were existing testing, I'd be happy to add something. But I'm not enthusiastic to be the first to set this up. However, breaking the test-syncer is somewhat low risk. If something doesn't work, we can revert. Then we don't have an archive for a day. The biggest risk is I guess to not rename the files at all (just like missing calling the function, which you caught in review). If more fuzz- prefixed tests are in the archive, we'd get even more garbage runs. But also that would not be a big deal for one day. |
|
Finally the linter is happy... |
|
Hey, this is clever! Thanks for doing this @mi-ac ! |
We already renamed "fuzz-" test cases from crash tests, so that clusterfuzz doesn't confuse them with output cases.
This change expands this functionality to all synced folders, also external repos.
BUG=http://b/379684065