Commit bfaa4440 authored by Benjamin Blanc's avatar Benjamin Blanc

tests: (ERP5_scalability) use flexible configuration for test suite

parent 4c1d0f96
......@@ -237,11 +237,7 @@ class ScalabilityLauncher(object):
suite = makeSuite(self.__argumentNamespace.test_suite, self.log)
test_suites = suite.getTestList()
test_path = suite.getTestPath()
test_duration = suite.getTestDuration()
benchmark_path_list = os.path.join(self.__argumentNamespace.erp5_location, test_path)
user_file_path = os.path.join(self.__argumentNamespace.erp5_location, test_path)
tester_path = self.__argumentNamespace.runner_path
while time.time()-start_time < max_time:
current_test = self.getNextTest()
......@@ -254,9 +250,17 @@ class ScalabilityLauncher(object):
self.log("Test Case %s is running..." %(current_test.title))
try:
current_test = int(current_test.title)
test_duration = suite.getTestDuration(current_test)
benchmark_path_list = os.path.join(self.__argumentNamespace.erp5_location, test_path)
#TODO: generate a basic user file with all scalability users.
user_file_path = os.path.join(self.__argumentNamespace.erp5_location, test_path)
tester_path = self.__argumentNamespace.runner_path
user_number = suite.getUserNumber(current_test)
tester_process = subprocess.Popen([tester_path,
self.__argumentNamespace.erp5_url,
'1',
str(user_number),
' '.join(test_suites),
'--benchmark-path-list', benchmark_path_list,
'--users-file-path', user_file_path,
......
......@@ -133,6 +133,9 @@ class ERP5_scalability(_ERP5):
def getTestPath(self):
return 'erp5/util/benchmark/examples/'
def getUserNumber(self, test_number):
return [1,2,4,8,16,32,64,128,256,512][test_number]
# Test duration in seconds
def getTestDuration(self):
return 60
def getTestDuration(self, test_number):
return [60,60,60,60,60,60,60,60,60,60][test_number]
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