-
Notifications
You must be signed in to change notification settings - Fork 588
[Fix] Correctly set testcase build url and gn args for fuzzing on batch #5013
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
Merged
+130
−44
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e95fc4f
Add build metadata to fuzz task output.
ViniciustCosta 72f9b65
Fix missing build metadata for testcase in fuzz on batch.
ViniciustCosta 558e941
Fix lint.
ViniciustCosta 9ba7e23
Fix comment.
ViniciustCosta 41f215f
Add unit tests for data handler.
ViniciustCosta 2d34e17
Force testcase update if build metadata is set.
ViniciustCosta 35da714
Fix.
ViniciustCosta fb8b00c
Merge branch 'master' into fix/fix_build_url_fuzz_batch
ViniciustCosta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,12 +40,11 @@ def setUp(self): | |
| test_utils.set_up_pyfakefs(self) | ||
| helpers.patch_environ(self) | ||
|
|
||
| def test_set(self): | ||
| """Test set everything.""" | ||
| def test_testcase_metadata_from_env(self): | ||
| """Tests the initial testcase metadata set from the env vars.""" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice improvement :) |
||
| os.environ['FAIL_RETRIES'] = '3' | ||
| os.environ['FAIL_WAIT'] = '3' | ||
| os.environ['BUILD_KEY'] = 'build_key_value' | ||
| os.environ['BUILD_KEY'] = 'build_key_value' | ||
| os.environ['BUILD_URL'] = 'build_url_value' | ||
| os.environ['APP_DIR'] = 'app_dir_value' | ||
| os.environ['GN_ARGS_PATH'] = 'app_dir_value/args.gn' | ||
|
|
@@ -66,6 +65,31 @@ def test_set(self): | |
| 'is_asan = true\nuse_goma = true\nv8_enable_verify_heap = true', | ||
| metadata['gn_args']) | ||
|
|
||
| def test_testcase_metadata_from_args(self): | ||
| """Tests that testcase build metadata is set from args.""" | ||
| build_key = 'build_key_test' | ||
| build_url = 'build_url_test' | ||
| os.environ['GN_ARGS_PATH'] = 'app_dir_value/args.gn' | ||
| self.fs.create_file( | ||
| 'app_dir_value/args.gn', | ||
| contents=('is_asan = true\n' | ||
| 'goma_dir = /home/user/goma\n' | ||
| 'use_goma = false\n' | ||
| 'v8_enable_verify_heap = true')) | ||
| gn_args = data_handler.get_filtered_gn_args() | ||
| del os.environ['GN_ARGS_PATH'] | ||
|
|
||
| testcase = data_types.Testcase() | ||
| data_handler.set_build_metadata_to_testcase( | ||
| testcase, build_key=build_key, build_url=build_url, gn_args=gn_args) | ||
| metadata = json.loads(testcase.additional_metadata) | ||
|
|
||
| self.assertEqual('build_key_test', metadata['build_key']) | ||
| self.assertEqual('build_url_test', metadata['build_url']) | ||
| self.assertEqual( | ||
| 'is_asan = true\nuse_goma = false\nv8_enable_verify_heap = true', | ||
| metadata['gn_args']) | ||
|
|
||
|
|
||
| @test_utils.with_cloud_emulators('datastore') | ||
| class DataHandlerTest(unittest.TestCase): | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.