aboutsummaryrefslogtreecommitdiff
path: root/infra/build_specified_commit_test.py
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2020-11-17 13:39:57 -0800
committerGitHub <noreply@github.com>2020-11-17 13:39:57 -0800
commitf3c0204d102b1fed8e982ee49160e8cc9292aeee (patch)
tree50be72f4008089d0b8f9cead4432cfbd5c9c4def /infra/build_specified_commit_test.py
parent93214a5535976d532475f322469367816beedd7b (diff)
downloadoss-fuzz-f3c0204d102b1fed8e982ee49160e8cc9292aeee.tar.gz
[NFC][CIFuzz] Fix coding issues. (#4550)
Fix some coding and style issues. 1. Treat "testcase" as one word. This is consistent with ClusterFuzz. 2. Treat "stacktrace" as one word. This is consistent with ClusterFuzz. 3. Fix spelling of comments and words in code. 4. Use descriptive style docstrings and remove unnecessary clutter (e.g. "Test the functionality of foo_function function in bar module" becomes "Tests foo_function." 5. Use JSON for a list needed in testing instead of pickle.
Diffstat (limited to 'infra/build_specified_commit_test.py')
-rw-r--r--infra/build_specified_commit_test.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/infra/build_specified_commit_test.py b/infra/build_specified_commit_test.py
index 6f666856a..7a8c8fefb 100644
--- a/infra/build_specified_commit_test.py
+++ b/infra/build_specified_commit_test.py
@@ -35,7 +35,7 @@ class BuildImageIntegrationTests(unittest.TestCase):
"""Testing if an image can be built from different states e.g. a commit."""
def test_build_fuzzers_from_commit(self):
- """Tests if the fuzzers can build at a proper commit.
+ """Tests if the fuzzers can build at a specified commit.
This is done by using a known regression range for a specific test case.
The old commit should show the error when its fuzzers run and the new one
@@ -72,8 +72,15 @@ class BuildImageIntegrationTests(unittest.TestCase):
def test_detect_main_repo_from_commit(self):
"""Test the detect main repo function from build specific commit module."""
- for example_repo in test_repos.TEST_REPOS:
+ # TODO(metzman): Fix these tests so they don't randomly break because of
+ # changes in the outside world.
+ test_repos_list = [
+ repo for repo in test_repos.TEST_REPOS if repo.project_name != 'usrsctp'
+ ]
+ for example_repo in test_repos_list:
if example_repo.new_commit:
+ # TODO(metzman): This function calls _build_image_with_retries which
+ # has a long delay (30 seconds). Figure out how to make this quicker.
repo_origin, repo_name = build_specified_commit.detect_main_repo(
example_repo.project_name, commit=example_repo.new_commit)
self.assertEqual(repo_origin, example_repo.git_url)