[tests-syncer] Rename fuzz files in the whole archive#5164
[tests-syncer] Rename fuzz files in the whole archive#5164javanlacerda merged 2 commits intogoogle:masterfrom
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.
This moved from above 1:1.
| 'LayoutTests') | ||
|
|
||
| test_folders = [ | ||
| 'CrashTests', |
There was a problem hiding this comment.
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.
Where is this function being called?
There was a problem hiding this comment.
Good catch :) - it's called now
4bf921d to
0f96ecc
Compare
javanlacerda
left a comment
There was a problem hiding this comment.
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
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