Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
bfaa4440
Commit
bfaa4440
authored
Jul 19, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: (ERP5_scalability) use flexible configuration for test suite
parent
4c1d0f96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
erp5/util/scalability/runScalabilityTestSuite.py
erp5/util/scalability/runScalabilityTestSuite.py
+9
-5
tests/__init__.py
tests/__init__.py
+5
-2
No files found.
erp5/util/scalability/runScalabilityTestSuite.py
View file @
bfaa4440
...
@@ -237,11 +237,7 @@ class ScalabilityLauncher(object):
...
@@ -237,11 +237,7 @@ class ScalabilityLauncher(object):
suite
=
makeSuite
(
self
.
__argumentNamespace
.
test_suite
,
self
.
log
)
suite
=
makeSuite
(
self
.
__argumentNamespace
.
test_suite
,
self
.
log
)
test_suites
=
suite
.
getTestList
()
test_suites
=
suite
.
getTestList
()
test_path
=
suite
.
getTestPath
()
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
:
while
time
.
time
()
-
start_time
<
max_time
:
current_test
=
self
.
getNextTest
()
current_test
=
self
.
getNextTest
()
...
@@ -254,9 +250,17 @@ class ScalabilityLauncher(object):
...
@@ -254,9 +250,17 @@ class ScalabilityLauncher(object):
self
.
log
(
"Test Case %s is running..."
%
(
current_test
.
title
))
self
.
log
(
"Test Case %s is running..."
%
(
current_test
.
title
))
try
:
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
,
tester_process
=
subprocess
.
Popen
([
tester_path
,
self
.
__argumentNamespace
.
erp5_url
,
self
.
__argumentNamespace
.
erp5_url
,
'1'
,
str
(
user_number
)
,
' '
.
join
(
test_suites
),
' '
.
join
(
test_suites
),
'--benchmark-path-list'
,
benchmark_path_list
,
'--benchmark-path-list'
,
benchmark_path_list
,
'--users-file-path'
,
user_file_path
,
'--users-file-path'
,
user_file_path
,
...
...
tests/__init__.py
View file @
bfaa4440
...
@@ -133,6 +133,9 @@ class ERP5_scalability(_ERP5):
...
@@ -133,6 +133,9 @@ class ERP5_scalability(_ERP5):
def
getTestPath
(
self
):
def
getTestPath
(
self
):
return
'erp5/util/benchmark/examples/'
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
# Test duration in seconds
def
getTestDuration
(
self
):
def
getTestDuration
(
self
,
test_number
):
return
60
return
[
60
,
60
,
60
,
60
,
60
,
60
,
60
,
60
,
60
,
60
][
test_number
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment