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
ecce7dbb
Commit
ecce7dbb
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Added -b in tester args to run only basic tests.
parent
a8204415
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
+7
-3
7 additions, 3 deletions
tester.py
with
7 additions
and
3 deletions
tester.py
+
7
−
3
View file @
ecce7dbb
...
@@ -35,8 +35,9 @@ sys.stderr = sys.stdout
...
@@ -35,8 +35,9 @@ sys.stderr = sys.stdout
class
Tester
():
class
Tester
():
USAGE
=
'''
%s [-e] [-d] [-h]
USAGE
=
'''
%s [-e]
[-b]
[-d] [-h]
-e: send email with report.
-e: send email with report.
-b: run only basic tests (exclude mediaserver tests).
-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__
...
@@ -70,7 +71,8 @@ class Tester():
...
@@ -70,7 +71,8 @@ class Tester():
sys
.
exit
(
1
)
sys
.
exit
(
1
)
# Check for email value
# Check for email value
email
=
'
-e
'
in
args
email
=
'
-e
'
in
args
tests
=
self
.
discover_tests
()
basic_only
=
'
-b
'
in
args
tests
=
self
.
discover_tests
(
basic_only
)
if
not
tests
:
if
not
tests
:
sys
.
exit
(
1
)
sys
.
exit
(
1
)
exit_code
=
self
.
run_tests
(
tests
,
email
)
exit_code
=
self
.
run_tests
(
tests
,
email
)
...
@@ -97,7 +99,7 @@ class Tester():
...
@@ -97,7 +99,7 @@ class Tester():
break
break
return
description
.
strip
()
return
description
.
strip
()
def
discover_tests
(
self
):
def
discover_tests
(
self
,
basic_only
=
False
):
tests
=
list
()
tests
=
list
()
# Get standard tests
# Get standard tests
path
=
os
.
path
.
join
(
self
.
root_dir
,
'
tests
'
)
path
=
os
.
path
.
join
(
self
.
root_dir
,
'
tests
'
)
...
@@ -114,6 +116,8 @@ class Tester():
...
@@ -114,6 +116,8 @@ class Tester():
if
os
.
path
.
isfile
(
test_path
):
if
os
.
path
.
isfile
(
test_path
):
description
=
self
.
get_file_description
(
test_path
)
description
=
self
.
get_file_description
(
test_path
)
tests
.
append
((
name
,
description
,
[
test_path
]))
tests
.
append
((
name
,
description
,
[
test_path
]))
if
basic_only
:
return
tests
# Get MS instances
# Get MS instances
ms_users
=
list
()
ms_users
=
list
()
for
user
in
os
.
listdir
(
'
/home
'
):
for
user
in
os
.
listdir
(
'
/home
'
):
...
...
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