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
22550e2d
Commit
22550e2d
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Added timestamps in tests (refs
#20343
).
parent
25066e4c
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
+4
-0
4 additions, 0 deletions
tester.py
with
4 additions
and
0 deletions
tester.py
+
4
−
0
View file @
22550e2d
...
...
@@ -156,6 +156,8 @@ class Tester():
# Run all tests
for
name
,
description
,
command
in
tests
:
log
(
'
\033
[1;95m-- Test
"
%s
"
--
\033
[0;0m
'
%
name
)
start_date
=
datetime
.
datetime
.
utcnow
()
log
(
'
Test start: %s UTC.
'
%
start_date
.
strftime
(
'
%Y-%m-%d %H:%M:%S
'
))
# Run test
p
=
subprocess
.
Popen
(
command
,
stdin
=
sys
.
stdin
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
out
,
err
=
p
.
communicate
()
...
...
@@ -171,6 +173,8 @@ class Tester():
success
=
False
exit_code
=
1
log
(
'
Command exited with code %s.
'
%
p
.
returncode
)
end_date
=
datetime
.
datetime
.
utcnow
()
log
(
'
Test end: %s UTC (duration: %s).
'
%
(
end_date
.
strftime
(
'
%Y-%m-%d %H:%M:%S
'
),
end_date
-
start_date
))
results
.
append
((
name
,
description
,
command
,
success
))
# Display results
log
(
'
\n
Tests results:
'
)
...
...
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