コード例 #1
0
  def testParseDEPSStringManually(self):
    """Tests DEPS parsing."""
    deps_file_contents = """
    vars = {
        'ffmpeg_hash':
             '@ac4a9f31fe2610bd146857bbd55d7a260003a888',
        'webkit_url':
             'https://chromium.googlesource.com/chromium/blink.git',
        'git_url':
             'https://chromium.googlesource.com',
        'webkit_rev':
             '@e01ac0a267d1017288bc67fa3c366b10469d8a24',
        'angle_revision':
             '74697cf2064c0a2c0d7e1b1b28db439286766a05'
    }"""

    # Should only expect SVN/git revisions to come through, and URLs should be
    # filtered out.
    expected_vars_dict = {
        'ffmpeg_hash': '@ac4a9f31fe2610bd146857bbd55d7a260003a888',
        'webkit_rev': '@e01ac0a267d1017288bc67fa3c366b10469d8a24',
        'angle_revision': '74697cf2064c0a2c0d7e1b1b28db439286766a05'
    }
    # Testing private function.
    # pylint: disable=W0212
    vars_dict = bisect_perf_regression._ParseRevisionsFromDEPSFileManually(
        deps_file_contents)
    self.assertEqual(vars_dict, expected_vars_dict)
コード例 #2
0
    def testParseDEPSStringManually(self):
        """Tests DEPS parsing."""
        deps_file_contents = """
    vars = {
        'ffmpeg_hash':
             '@ac4a9f31fe2610bd146857bbd55d7a260003a888',
        'webkit_url':
             'https://chromium.googlesource.com/chromium/blink.git',
        'git_url':
             'https://chromium.googlesource.com',
        'webkit_rev':
             '@e01ac0a267d1017288bc67fa3c366b10469d8a24',
        'angle_revision':
             '74697cf2064c0a2c0d7e1b1b28db439286766a05'
    }"""

        # Should only expect SVN/git revisions to come through, and URLs should be
        # filtered out.
        expected_vars_dict = {
            'ffmpeg_hash': '@ac4a9f31fe2610bd146857bbd55d7a260003a888',
            'webkit_rev': '@e01ac0a267d1017288bc67fa3c366b10469d8a24',
            'angle_revision': '74697cf2064c0a2c0d7e1b1b28db439286766a05'
        }
        # Testing private function.
        # pylint: disable=W0212
        vars_dict = bisect_perf_regression._ParseRevisionsFromDEPSFileManually(
            deps_file_contents)
        self.assertEqual(vars_dict, expected_vars_dict)