fix looponfailing issue to always run against the newest version of the source
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
1.3
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
- fix --looponfailing - it would not actually run against the fully changed
|
||||||
|
source tree when initial conftest files load application state.
|
||||||
|
|
||||||
1.2
|
1.2
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ class TestLooponFailing:
|
|||||||
""")
|
""")
|
||||||
session = LooponfailingSession(modcol.config)
|
session = LooponfailingSession(modcol.config)
|
||||||
loopstate = LoopState()
|
loopstate = LoopState()
|
||||||
session.remotecontrol.setup()
|
|
||||||
session.loop_once(loopstate)
|
session.loop_once(loopstate)
|
||||||
assert len(loopstate.colitems) == 1
|
assert len(loopstate.colitems) == 1
|
||||||
|
|
||||||
@@ -83,7 +82,6 @@ class TestLooponFailing:
|
|||||||
""")
|
""")
|
||||||
session = LooponfailingSession(modcol.config)
|
session = LooponfailingSession(modcol.config)
|
||||||
loopstate = LoopState()
|
loopstate = LoopState()
|
||||||
session.remotecontrol.setup()
|
|
||||||
loopstate.colitems = []
|
loopstate.colitems = []
|
||||||
session.loop_once(loopstate)
|
session.loop_once(loopstate)
|
||||||
assert len(loopstate.colitems) == 1
|
assert len(loopstate.colitems) == 1
|
||||||
@@ -110,7 +108,6 @@ class TestLooponFailing:
|
|||||||
""")
|
""")
|
||||||
session = LooponfailingSession(modcol.config)
|
session = LooponfailingSession(modcol.config)
|
||||||
loopstate = LoopState()
|
loopstate = LoopState()
|
||||||
session.remotecontrol.setup()
|
|
||||||
loopstate.colitems = []
|
loopstate.colitems = []
|
||||||
session.loop_once(loopstate)
|
session.loop_once(loopstate)
|
||||||
assert len(loopstate.colitems) == 2
|
assert len(loopstate.colitems) == 2
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ class LooponfailingSession(Session):
|
|||||||
def main(self, initialitems):
|
def main(self, initialitems):
|
||||||
try:
|
try:
|
||||||
self.loopstate = loopstate = LoopState([])
|
self.loopstate = loopstate = LoopState([])
|
||||||
self.remotecontrol.setup()
|
|
||||||
while 1:
|
while 1:
|
||||||
self.loop_once(loopstate)
|
self.loop_once(loopstate)
|
||||||
if not loopstate.colitems and loopstate.wasfailing:
|
if not loopstate.colitems and loopstate.wasfailing:
|
||||||
@@ -34,10 +33,10 @@ class LooponfailingSession(Session):
|
|||||||
print
|
print
|
||||||
|
|
||||||
def loop_once(self, loopstate):
|
def loop_once(self, loopstate):
|
||||||
|
self.remotecontrol.setup()
|
||||||
colitems = loopstate.colitems
|
colitems = loopstate.colitems
|
||||||
loopstate.wasfailing = colitems and len(colitems)
|
loopstate.wasfailing = colitems and len(colitems)
|
||||||
loopstate.colitems = self.remotecontrol.runsession(colitems or ())
|
loopstate.colitems = self.remotecontrol.runsession(colitems or ())
|
||||||
self.remotecontrol.setup()
|
|
||||||
|
|
||||||
class LoopState:
|
class LoopState:
|
||||||
def __init__(self, colitems=None):
|
def __init__(self, colitems=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user