Commit 8cd0a55a authored by Benjamin Blanc's avatar Benjamin Blanc

Up

parent 8bd1947a
......@@ -37,11 +37,12 @@ import shutil
import logging
import string
import random
import testnodeUtils
from ProcessManager import SubprocessError, ProcessManager, CancellationError
from subprocess import CalledProcessError
from Updater import Updater
from erp5.util import taskdistribution
from testnode import deunicodeData
class ScalabilityTestRunner():
......@@ -104,7 +105,7 @@ class ScalabilityTestRunner():
print "...isValidatedMaster(..):"
print self.testnode.test_suite_portal.isValidatedMaster(
self.testnode.config['test_node_title'])
test_configuration = deunicodeData(
test_configuration = testnodeUtils.deunicodeData(
json.loads(
self.testnode.test_suite_portal.generateConfiguration(
node_test_suite.test_suite_title)))
......
......@@ -37,6 +37,7 @@ import shutil
import logging
import string
import random
import testnodeUtils
from ProcessManager import SubprocessError, ProcessManager, CancellationError
from subprocess import CalledProcessError
from Updater import Updater
......@@ -45,6 +46,7 @@ from ScalabilityTestRunner import ScalabilityTestRunner
from UnitTestRunner import UnitTestRunner
from erp5.util import taskdistribution
DEFAULT_SLEEP_TIMEOUT = 120 # time in seconds to sleep
MAX_LOG_TIME = 15 # time in days we should keep logs that we can see through
# httd
......@@ -59,30 +61,6 @@ class DummyLogger(object):
'critical', 'fatal'):
setattr(self, name, func)
def deunicodeData(data):
if isinstance(data, int):
new_data = data
elif isinstance(data, str):
new_data = data
elif isinstance(data, list):
new_data = []
for sub_data in data:
new_data.append(deunicodeData(sub_data))
elif isinstance(data, unicode):
new_data = data.encode('utf8')
elif isinstance(data, dict):
new_data = {}
for key, value in data.iteritems():
key = deunicodeData(key)
value = deunicodeData(value)
new_data[key] = value
else:
new_data = data
return new_data
class TestNode(object):
def __init__(self, log, config, max_log_time=MAX_LOG_TIME,
......@@ -337,7 +315,7 @@ branch = %(branch)s
self.test_suite_portal.subscribeNode(config['test_node_title'], config['computer_id'])
test_suite_json = self.test_suite_portal.startTestSuite(config['test_node_title'])
test_suite_data = deunicodeData(json.loads(test_suite_json))
test_suite_data = testnodeUtils.deunicodeData(json.loads(test_suite_json))
log("Got following test suite data from master : %r" % \
(test_suite_data,))
##/BLOCK OK
......
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