Commit 3505e941 authored by Daniel Brown's avatar Daniel Brown
Browse files

removing src and lib directory after build as they take up a fair bit of space

parent b9ae392a
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment