Exemplo n.º 1
0
 def testModerateFailsTwo(self):
   build_history = [
     (1, {'m1': {'b1': False}, 'm2': {'b2': True}}),
   ]
   lkgr_steps = {'m1': {'b1': ['step']}, 'm2': {'b2': ['step']}}
   candidate = lkgr_finder.FindLKGRCandidate(build_history, lkgr_steps)
   self.assertEquals(candidate, -1)
Exemplo n.º 2
0
 def testSimpleFails(self):
   build_history = [
     (1, {'m1': {'b1': False}}),
   ]
   lkgr_steps = {'m1': {'b1': ['step']}}
   candidate = lkgr_finder.FindLKGRCandidate(build_history, lkgr_steps)
   self.assertEquals(candidate, -1)
Exemplo n.º 3
0
 def testMultipleRevHistory(self):
   build_history = [
     (4, {'m1': {'b1': True},  'm2': {'b2': True}}),
     (3, {'m1': {'b1': False}, 'm2': {'b2': True}}),
     (2, {'m1': {'b1': True},  'm2': {'b2': False}}),
     (1, {'m1': {'b1': False}, 'm2': {'b2': False}}),
   ]
   lkgr_steps = {'m1': {'b1': ['step']}, 'm2': {'b2': ['step']}}
   candidate = lkgr_finder.FindLKGRCandidate(build_history, lkgr_steps)
   self.assertEquals(candidate, 4)
Exemplo n.º 4
0
 def testMissingFails(self):
   build_history = [
     (5, {'m1': {'b1': True},  }),
     (4, {                     'm2': {'b2': True}}),
     (3, {'m1': {'b1': False}, 'm2': {'b2': True}}),
     (2, {'m1': {'b1': True},  'm2': {'b2': False}}),
     (1, {'m1': {'b1': False}, 'm2': {'b2': False}}),
   ]
   lkgr_steps = {'m1': {'b1': ['step']}, 'm2': {'b2': ['step']}}
   candidate = lkgr_finder.FindLKGRCandidate(build_history, lkgr_steps)
   self.assertEquals(candidate, -1)