Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
07a723c0
Commit
07a723c0
authored
Aug 27, 2014
by
Minh Tue Vo
Committed by
benrobot
Oct 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing file log error
parent
bef4e9c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
scripts/post_worker.py
+12
-5
No files found.
scripts/post_worker.py
View file @
07a723c0
...
...
@@ -20,22 +20,28 @@ with tarfile.open(output_filename, "w:gz") as tar:
tar
.
close
()
session_path
=
os
.
environ
[
'HOME'
]
+
'/results/'
+
os
.
environ
[
'TDDIUM_SESSION_ID'
]
+
'/session/'
file_dest
=
session_path
+
'reports.tar.gz'
session_path
=
os
.
path
.
join
(
os
.
environ
[
'HOME'
],
'results'
,
os
.
environ
[
'TDDIUM_SESSION_ID'
],
'session'
)
file_dest
=
os
.
path
.
join
(
session_path
,
'reports.tar.gz'
)
# if the tar file is not empty, copy it to the proper place
if
count
>
0
:
print
'copying tar file to:'
,
file_dest
shutil
.
copyfile
(
output_filename
,
file_dest
)
print
'done copying file'
# finding if there is any screenshot or log file
print
'attaching failed screenshots and logs (if any)'
for
(
path
,
dirs
,
files
)
in
os
.
walk
(
'test_root/log'
):
for
filename
in
files
:
if
filename
.
find
(
'png'
)
!=
-
1
or
filename
.
find
(
'log'
)
!=
-
1
:
filepath
=
path
+
filename
filepath
=
os
.
path
.
join
(
path
,
filename
)
print
'copying file:'
,
filepath
destpath
=
session_path
+
filename
destpath
=
os
.
path
.
join
(
session_path
,
filename
)
print
'destination:'
,
destpath
shutil
.
copyfile
(
filepath
,
destpath
)
print
'TDDIUM_SESSION_ID:'
,
os
.
environ
[
'TDDIUM_SESSION_ID'
]
\ No newline at end of file
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