Commit b9b2048c authored by Sebastien Robin's avatar Sebastien Robin

testnode: avoid to rebuild testnode dependencies (firefox) all the time (fix tests)

parent 85d5fd91
...@@ -720,9 +720,11 @@ shared = true ...@@ -720,9 +720,11 @@ shared = true
# TestNode # TestNode
test_node = self.getTestNode() test_node = self.getTestNode()
# Modify class UnitTestRunner(or more after) method # Modify class UnitTestRunner(or more after) method
def patch_prepareSlapOS(*args, **kw):
return {'status_code':0}
original_prepareSlapOS = RunnerClass._prepareSlapOS original_prepareSlapOS = RunnerClass._prepareSlapOS
original_runTestSuite = RunnerClass.runTestSuite original_runTestSuite = RunnerClass.runTestSuite
RunnerClass._prepareSlapOS = doNothing RunnerClass._prepareSlapOS = patch_prepareSlapOS
RunnerClass.runTestSuite = patch_runTestSuite RunnerClass.runTestSuite = patch_runTestSuite
SlapOSControler.initializeSlapOSControler = doNothing SlapOSControler.initializeSlapOSControler = doNothing
# Inside test_node a runner is created using new UnitTestRunner methods # Inside test_node a runner is created using new UnitTestRunner methods
...@@ -886,7 +888,9 @@ shared = true ...@@ -886,7 +888,9 @@ shared = true
else: else:
RunnerClass.runTestSuite = doNothing RunnerClass.runTestSuite = doNothing
RunnerClass._prepareSlapOS = doNothing def patch_prepareSlapOS(*args, **kw):
return {'status_code':0}
RunnerClass._prepareSlapOS = patch_prepareSlapOS
SlapOSControler.initializeSlapOSControler = doNothing SlapOSControler.initializeSlapOSControler = doNothing
test_node.run() test_node.run()
self.assertEquals(counter, 3) self.assertEquals(counter, 3)
......
...@@ -302,8 +302,8 @@ shared = true ...@@ -302,8 +302,8 @@ shared = true
runner = runner_class(self) runner = runner_class(self)
logger.info("Type of current test is %s", my_test_type) logger.info("Type of current test is %s", my_test_type)
# master testnode gets test_suites, slaves get nothing # master testnode gets test_suites, slaves get nothing
testnode_software_status_dict = runner.prepareSlapOSForTestNode(test_node_slapos)
if not(testnode_software_successfully_built): if not(testnode_software_successfully_built):
testnode_software_status_dict = runner.prepareSlapOSForTestNode(test_node_slapos)
if testnode_software_status_dict['status_code'] == 0: if testnode_software_status_dict['status_code'] == 0:
testnode_software_successfully_built = True testnode_software_successfully_built = True
logger.info("Will now skip build of testnode software") logger.info("Will now skip build of testnode software")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment