Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
00220bfc
Commit
00220bfc
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Changed instances selections for tests (refs
#20760
).
parent
8ae456f2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
global-conf.sh
+6
-0
6 additions, 0 deletions
global-conf.sh
tester.py
+22
-3
22 additions, 3 deletions
tester.py
with
28 additions
and
3 deletions
global-conf.sh
+
6
−
0
View file @
00220bfc
...
@@ -109,6 +109,12 @@ HA_LB1_IP='192.168.41.177'
...
@@ -109,6 +109,12 @@ HA_LB1_IP='192.168.41.177'
HA_LB2
=
HA_LB2
=
HA_LB2_IP
=
HA_LB2_IP
=
# -- Tester config --
# separate values with commas
TESTER_MS_INSTANCES
=
# TESTER_MAX_INSTANCES is ignored if TESTER_MS_INSTANCES is set
TESTER_MAX_INSTANCES
=
# Upstream configuration override
# Upstream configuration override
# -------------------------------
# -------------------------------
...
...
This diff is collapsed.
Click to expand it.
tester.py
+
22
−
3
View file @
00220bfc
...
@@ -49,7 +49,6 @@ class Tester():
...
@@ -49,7 +49,6 @@ class Tester():
VALID_ARGS
=
[
'
-e
'
,
'
-f
'
,
'
-b
'
,
'
-d
'
,
'
-h
'
]
VALID_ARGS
=
[
'
-e
'
,
'
-f
'
,
'
-b
'
,
'
-d
'
,
'
-h
'
]
MAX_LOG_FILES
=
50
MAX_LOG_FILES
=
50
NO_MAIL_FAILURES_COUNT
=
30
NO_MAIL_FAILURES_COUNT
=
30
MAX_INSTANCES
=
2
def
__init__
(
self
,
*
args
):
def
__init__
(
self
,
*
args
):
log
(
'
\033
[96m-------------------------------
\033
[0m
'
)
log
(
'
\033
[96m-------------------------------
\033
[0m
'
)
...
@@ -148,8 +147,28 @@ class Tester():
...
@@ -148,8 +147,28 @@ class Tester():
ms_users
.
append
(
user
)
ms_users
.
append
(
user
)
# Get MediaServer tests
# Get MediaServer tests
if
ms_users
:
if
ms_users
:
if
len
(
ms_users
)
>
self
.
MAX_INSTANCES
:
ms_users
.
sort
()
ms_users
=
ms_users
[:
self
.
MAX_INSTANCES
]
cleaned_list
=
list
()
instances_to_test
=
utils
.
get_conf
(
'
TESTER_MS_INSTANCES
'
,
''
).
split
(
'
,
'
)
if
instances_to_test
:
for
val
in
instances_to_test
:
val
=
val
.
strip
()
if
not
val
:
continue
if
val
in
ms_users
:
cleaned_list
.
append
(
val
)
else
:
log
(
'
An inexisting instance has been requested for tests:
"
%s
"
.
'
%
val
)
if
cleaned_list
:
ms_users
=
cleaned_list
else
:
try
:
max_instances
=
int
(
utils
.
get_conf
(
'
TESTER_MAX_INSTANCES
'
)
or
2
)
except
Exception
as
e
:
log
(
'
TESTER_MAX_INSTANCES has an invalid value: %s
'
%
e
)
max_instances
=
2
if
len
(
ms_users
)
>
max_instances
:
ms_users
=
ms_users
[:
max_instances
]
# Clone testing suite
# Clone testing suite
ms_path
=
os
.
path
.
join
(
path
,
'
ms-testing-suite
'
)
ms_path
=
os
.
path
.
join
(
path
,
'
ms-testing-suite
'
)
if
os
.
path
.
exists
(
ms_path
):
if
os
.
path
.
exists
(
ms_path
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment