Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: tests/gclient_smoketest.py

Issue 1099143002: Disabled flaky depot_tools tests (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Addressed comments Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/checkout_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Smoke tests for gclient.py. 6 """Smoke tests for gclient.py.
7 7
8 Shell out 'gclient' and run basic conformance tests. 8 Shell out 'gclient' and run basic conformance tests.
9 9
10 This test assumes GClientSmokeBase.URL_BASE is valid. 10 This test assumes GClientSmokeBase.URL_BASE is valid.
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 self.assertEqual('OWNERS-post', owners_content, 'OWNERS not updated') 1575 self.assertEqual('OWNERS-post', owners_content, 'OWNERS not updated')
1576 self.assertTrue(os.path.exists(join(self.blink, 'Source', 'exists_always'))) 1576 self.assertTrue(os.path.exists(join(self.blink, 'Source', 'exists_always')))
1577 # Check that file removed between the branch point are actually deleted. 1577 # Check that file removed between the branch point are actually deleted.
1578 self.assertTrue(os.path.exists( 1578 self.assertTrue(os.path.exists(
1579 join(self.blink, 'Source', 'exists_after_but_not_before'))) 1579 join(self.blink, 'Source', 'exists_after_but_not_before')))
1580 self.assertFalse(os.path.exists( 1580 self.assertFalse(os.path.exists(
1581 join(self.blink, 'Source', 'exists_before_but_not_after'))) 1581 join(self.blink, 'Source', 'exists_before_but_not_after')))
1582 # But not the .git folder 1582 # But not the .git folder
1583 self.assertFalse(os.path.exists(join(self.blink, '.git'))) 1583 self.assertFalse(os.path.exists(join(self.blink, '.git')))
1584 1584
1585 @unittest.skip('flaky')
1585 def testBlinkDEPSChangeUsingGclient(self): 1586 def testBlinkDEPSChangeUsingGclient(self):
1586 """Checks that {src,blink} repos are consistent when syncing going back and 1587 """Checks that {src,blink} repos are consistent when syncing going back and
1587 forth using gclient sync src@revision.""" 1588 forth using gclient sync src@revision."""
1588 if not self.enabled: 1589 if not self.enabled:
1589 return 1590 return
1590 1591
1591 self.gclient(['config', '--spec', 1592 self.gclient(['config', '--spec',
1592 'solutions=[' 1593 'solutions=['
1593 '{"name": "src",' 1594 '{"name": "src",'
1594 ' "url": "' + self.git_base + 'repo_1",' 1595 ' "url": "' + self.git_base + 'repo_1",'
1595 '}]']) 1596 '}]'])
1596 1597
1597 # Go back and forth two times. 1598 # Go back and forth two times.
1598 for _ in xrange(2): 1599 for _ in xrange(2):
1599 res = self.gclient(['sync', '--jobs', '1', 1600 res = self.gclient(['sync', '--jobs', '1',
1600 '--revision', 'src@%s' % self.pre_merge_sha]) 1601 '--revision', 'src@%s' % self.pre_merge_sha])
1601 self.assertEqual(res[2], 0, 'DEPS change sync failed.') 1602 self.assertEqual(res[2], 0, 'DEPS change sync failed.')
1602 self.CheckStatusPreMergePoint() 1603 self.CheckStatusPreMergePoint()
1603 1604
1604 res = self.gclient(['sync', '--jobs', '1', 1605 res = self.gclient(['sync', '--jobs', '1',
1605 '--revision', 'src@%s' % self.post_merge_sha]) 1606 '--revision', 'src@%s' % self.post_merge_sha])
1606 self.assertEqual(res[2], 0, 'DEPS change sync failed.') 1607 self.assertEqual(res[2], 0, 'DEPS change sync failed.')
1607 self.CheckStatusPostMergePoint() 1608 self.CheckStatusPostMergePoint()
1608 1609
1609 1610
1611 @unittest.skip('flaky')
1610 def testBlinkDEPSChangeUsingGit(self): 1612 def testBlinkDEPSChangeUsingGit(self):
1611 """Like testBlinkDEPSChangeUsingGclient, but move the main project using 1613 """Like testBlinkDEPSChangeUsingGclient, but move the main project using
1612 directly git and not gclient sync.""" 1614 directly git and not gclient sync."""
1613 if not self.enabled: 1615 if not self.enabled:
1614 return 1616 return
1615 1617
1616 self.gclient(['config', '--spec', 1618 self.gclient(['config', '--spec',
1617 'solutions=[' 1619 'solutions=['
1618 '{"name": "src",' 1620 '{"name": "src",'
1619 ' "url": "' + self.git_base + 'repo_1",' 1621 ' "url": "' + self.git_base + 'repo_1",'
(...skipping 12 matching lines...) Expand all
1632 self.assertEqual(res[2], 0, 'gclient sync failed.') 1634 self.assertEqual(res[2], 0, 'gclient sync failed.')
1633 self.CheckStatusPreMergePoint() 1635 self.CheckStatusPreMergePoint()
1634 1636
1635 subprocess2.check_call(['git', 'checkout', '-q', self.post_merge_sha], 1637 subprocess2.check_call(['git', 'checkout', '-q', self.post_merge_sha],
1636 cwd=self.checkout_path) 1638 cwd=self.checkout_path)
1637 res = self.gclient(['sync', '--jobs', '1']) 1639 res = self.gclient(['sync', '--jobs', '1'])
1638 self.assertEqual(res[2], 0, 'DEPS change sync failed.') 1640 self.assertEqual(res[2], 0, 'DEPS change sync failed.')
1639 self.CheckStatusPostMergePoint() 1641 self.CheckStatusPostMergePoint()
1640 1642
1641 1643
1644 @unittest.skip('flaky')
1642 def testBlinkLocalBranchesArePreserved(self): 1645 def testBlinkLocalBranchesArePreserved(self):
1643 """Checks that the state of local git branches are effectively preserved 1646 """Checks that the state of local git branches are effectively preserved
1644 when going back and forth.""" 1647 when going back and forth."""
1645 if not self.enabled: 1648 if not self.enabled:
1646 return 1649 return
1647 1650
1648 self.gclient(['config', '--spec', 1651 self.gclient(['config', '--spec',
1649 'solutions=[' 1652 'solutions=['
1650 '{"name": "src",' 1653 '{"name": "src",'
1651 ' "url": "' + self.git_base + 'repo_1",' 1654 ' "url": "' + self.git_base + 'repo_1",'
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 1776
1774 if '-c' in sys.argv: 1777 if '-c' in sys.argv:
1775 COVERAGE = True 1778 COVERAGE = True
1776 sys.argv.remove('-c') 1779 sys.argv.remove('-c')
1777 if os.path.exists('.coverage'): 1780 if os.path.exists('.coverage'):
1778 os.remove('.coverage') 1781 os.remove('.coverage')
1779 os.environ['COVERAGE_FILE'] = os.path.join( 1782 os.environ['COVERAGE_FILE'] = os.path.join(
1780 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 1783 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
1781 '.coverage') 1784 '.coverage')
1782 unittest.main() 1785 unittest.main()
OLDNEW
« no previous file with comments | « tests/checkout_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698