Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
3505e941
Commit
3505e941
authored
Aug 17, 2013
by
Daniel Brown
Browse files
removing src and lib directory after build as they take up a fair bit of space
parent
b9ae392a
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/testing/web/web_interface.py
View file @
3505e941
...
...
@@ -116,25 +116,6 @@ class FinesseProcessWatcher(Thread):
print
"Watcher is continuing"
try
:
# store a copy of the kat file for future use if a nobuild is
# requested from the user.
if
sys
.
platform
==
"win32"
:
EXE
=
".exe"
else
:
EXE
=
""
KAT_EXE
=
os
.
path
.
join
(
app
.
instance_path
,
"tests"
,
str
(
self
.
process_to_watch
.
test_id
),
"build"
,
"kat"
+
EXE
)
KAT_STORE_PATH
=
os
.
path
.
join
(
app
.
instance_path
,
"kat_store"
)
KAT_STORE_EXE
=
os
.
path
.
join
(
KAT_STORE_PATH
,
"kat_"
+
str
(
self
.
process_to_watch
.
get_version
())
+
EXE
)
if
not
os
.
path
.
exists
(
KAT_STORE_PATH
):
os
.
mkdir
(
KAT_STORE_PATH
)
if
os
.
path
.
exists
(
KAT_EXE
):
if
os
.
path
.
exists
(
KAT_STORE_EXE
):
os
.
remove
(
KAT_STORE_EXE
)
shutil
.
copyfile
(
KAT_EXE
,
KAT_STORE_EXE
)
testdoc
=
db
.
get
(
'testid'
,
self
.
process_to_watch
.
test_id
,
...
...
@@ -202,6 +183,33 @@ class FinesseProcessWatcher(Thread):
#finally update with details on the kat files ran
testdoc
[
"kats_run"
]
=
kats_run
db
.
update
(
testdoc
)
# store a copy of the kat file for future use if a nobuild is
# requested from the user.
if
sys
.
platform
==
"win32"
:
EXE
=
".exe"
else
:
EXE
=
""
KAT_EXE
=
os
.
path
.
join
(
app
.
instance_path
,
"tests"
,
str
(
self
.
process_to_watch
.
test_id
),
"build"
,
"kat"
+
EXE
)
KAT_STORE_PATH
=
os
.
path
.
join
(
app
.
instance_path
,
"kat_store"
)
KAT_STORE_EXE
=
os
.
path
.
join
(
KAT_STORE_PATH
,
"kat_"
+
str
(
self
.
process_to_watch
.
get_version
())
+
EXE
)
if
not
os
.
path
.
exists
(
KAT_STORE_PATH
):
os
.
mkdir
(
KAT_STORE_PATH
)
if
os
.
path
.
exists
(
KAT_EXE
):
if
os
.
path
.
exists
(
KAT_STORE_EXE
):
os
.
remove
(
KAT_STORE_EXE
)
shutil
.
copyfile
(
KAT_EXE
,
KAT_STORE_EXE
)
# Remove the src and lib directories from the build as they are not needed
# and take up a fair bit of space
BUILD_PATH
=
os
.
path
.
join
(
self
.
process_to_watch
.
BASE_DIR
,
"build"
)
utils
.
runcmd
([
"rm"
,
"src"
,
"-rf"
],
cwd
=
BUILD_PATH
)
utils
.
runcmd
([
"rm"
,
"lib"
,
"-rf"
],
cwd
=
BUILD_PATH
)
except
RecordNotFound
:
print
"Could not find database records for test id "
+
str
(
self
.
process_to_watch
.
test_id
)
pass
...
...
Write
Preview
Supports
Markdown
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