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
72cfb580
Commit
72cfb580
authored
7 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Restart tester if updated (refs
#24053
).
parent
3915d125
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tester.py
+11
-3
11 additions, 3 deletions
tester.py
with
11 additions
and
3 deletions
tester.py
+
11
−
3
View file @
72cfb580
...
@@ -71,13 +71,14 @@ def raid_idle():
...
@@ -71,13 +71,14 @@ def raid_idle():
class
Tester
():
class
Tester
():
USAGE
=
'''
%s [-e] [-f] [-b] [-d] [-h] [msuser]
USAGE
=
'''
%s [-e] [-f] [-b]
[-n]
[-d] [-h] [msuser]
-e: send email with report.
-e: send email with report.
-f: send email with report only if at least one test failed.
-f: send email with report only if at least one test failed.
-b: run only basic tests (exclude mediaserver tests).
-b: run only basic tests (exclude mediaserver tests).
-n: do not update envsetup repository.
-d: debug mode (can be started with non root users).
-d: debug mode (can be started with non root users).
-h: show this message.
'''
%
__file__
-h: show this message.
'''
%
__file__
VALID_ARGS
=
[
'
-e
'
,
'
-f
'
,
'
-b
'
,
'
-d
'
,
'
-h
'
]
VALID_ARGS
=
[
'
-e
'
,
'
-f
'
,
'
-b
'
,
'
-n
'
,
'
-d
'
,
'
-h
'
]
MAX_LOG_FILES
=
50
MAX_LOG_FILES
=
50
NO_MAIL_FAILURES_COUNT
=
5
NO_MAIL_FAILURES_COUNT
=
5
...
@@ -119,7 +120,14 @@ class Tester():
...
@@ -119,7 +120,14 @@ class Tester():
log
(
'
This script should be run as root user.
'
)
log
(
'
This script should be run as root user.
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
# Update envsetup files
# Update envsetup files
subprocess
.
call
([
'
python3
'
,
'
update_envsetup.py
'
])
if
'
-n
'
not
in
args
:
tester_path
=
os
.
path
.
join
(
root_dir
,
os
.
path
.
basename
(
__file__
))
mtime
=
os
.
path
.
getmtime
(
tester_path
)
subprocess
.
call
([
'
python3
'
,
'
update_envsetup.py
'
])
if
mtime
!=
os
.
path
.
getmtime
(
tester_path
):
log
(
'
The script has changed, restarting it...
'
)
os
.
execl
(
'
/bin/python3
'
,
'
python3
'
,
tester_path
,
'
-n
'
,
*
args
)
sys
.
exit
(
1
)
# not reachable
# Load conf
# Load conf
conf
=
utils
.
load_conf
()
conf
=
utils
.
load_conf
()
if
not
conf
:
if
not
conf
:
...
...
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