def testAutoSyncProject(self):
   """Test pulling down of projects not in manifest."""
   chrome_set_ver.main(['-d',
                        os.path.join(self.test_base, 'test_6/DEPS.git')])
   repo_path = os.path.join(self.repo_root, 'chromium/src/does_not_exist')
   self.assertTrue(git.GetGitRepoRevision(repo_path) ==
                   '8d35063e1836c79c9ef97bf81eb43f450dc111ac')
 def testAutoSyncProject(self):
   """Test pulling down of projects not in manifest."""
   chrome_set_ver.main(['-d',
                        os.path.join(self.test_base, 'test_6/DEPS.git')])
   repo_path = os.path.join(self.repo_root, 'chromium/src/does_not_exist')
   self.assertTrue(git.GetGitRepoRevision(repo_path) ==
                   '8d35063e1836c79c9ef97bf81eb43f450dc111ac')
  def testParseAndRunDEPSFileWithHooks(self):
    """Test correct operation with --runhooks option."""
    chrome_set_ver.main(['--runhooks', '-d',
                         os.path.join(self.test_base, 'test_1/DEPS.git')])

    self._VerifyReposAndSymlink()

    # Verify hooks were run
    hook1_output = os.path.join(self.repo_root, 'chromium', 'out1')
    hook2_output = os.path.join(self.repo_root, 'chromium', 'out2')
    self.assertTrue(os.path.exists(hook1_output))
    self.assertTrue(os.path.exists(hook2_output))
  def testParseAndRunDEPSFileWithHooks(self):
    """Test correct operation with --runhooks option."""
    chrome_set_ver.main(['--runhooks', '-d',
                         os.path.join(self.test_base, 'test_1/DEPS.git')])

    self._VerifyReposAndSymlink()

    # Verify hooks were run
    hook1_output = os.path.join(self.repo_root, 'chromium', 'out1')
    hook2_output = os.path.join(self.repo_root, 'chromium', 'out2')
    self.assertTrue(os.path.exists(hook1_output))
    self.assertTrue(os.path.exists(hook2_output))
  def testParseInternalDEPSFile(self):
    """Test that the internal DEPS file is found and parsed properly."""
    shutil.copyfile(os.path.join(self.test_base, 'test_internal/DEPS.git'),
                    os.path.join(self.repo_root,
                                 'chromium/src-internal/.DEPS.git'))

    chrome_set_ver.main(['-d',
                         os.path.join(self.test_base, 'test_1/DEPS.git')])

    repos = {'repo_internal': '8d35063e1836c79c9ef97bf81eb43f450dc111ac'}

    for repo, revision in repos.iteritems():
      repo_path = os.path.join(self.repo_root, 'chromium', 'src', repo)
      self.assertTrue(git.GetGitRepoRevision(repo_path) == revision)
Esempio n. 6
0
    def testParseInternalDEPSFile(self):
        """Test that the internal DEPS file is found and parsed properly."""
        shutil.copyfile(
            os.path.join(self.test_base, 'test_internal/DEPS.git'),
            os.path.join(self.repo_root, 'chromium/src-internal/.DEPS.git'))

        chrome_set_ver.main(
            ['-d', os.path.join(self.test_base, 'test_1/DEPS.git')])

        repos = {'repo_internal': '8d35063e1836c79c9ef97bf81eb43f450dc111ac'}

        for repo, revision in repos.iteritems():
            repo_path = os.path.join(self.repo_root, 'chromium', 'src', repo)
            self.assertTrue(git.GetGitRepoRevision(repo_path) == revision)
  def testParseAndRunDEPSFileNoHooks(self):
    """Test resetting of repos, usage of Var's."""
    chrome_set_ver.main(['-d',
                         os.path.join(self.test_base, 'test_1/DEPS.git')])

    self._VerifyReposAndSymlink()
Esempio n. 8
0
    def testParseAndRunDEPSFileNoHooks(self):
        """Test resetting of repos, usage of Var's."""
        chrome_set_ver.main(
            ['-d', os.path.join(self.test_base, 'test_1/DEPS.git')])

        self._VerifyReposAndSymlink()