aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Matthews <cmatthews5@apple.com>2016-08-24 00:01:41 +0000
committerChris Matthews <cmatthews5@apple.com>2016-08-24 00:01:41 +0000
commit8b8ee831997053e92c9cbc431ff4d53e4dd93ce1 (patch)
tree5906e46c741c517c0b64f4d3e4b9e1aaf4e76620
parent4190aa36559351870917e7049bb4256f0abadb2d (diff)
Make sure host compilers are clean
In some places the host-compiler was being checked out in a dirty directory, don't do that! git-svn-id: https://llvm.org/svn/llvm-project/zorg/trunk@279592 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--zorg/jenkins/build.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/zorg/jenkins/build.py b/zorg/jenkins/build.py
index 84fdae5c..2bded124 100644
--- a/zorg/jenkins/build.py
+++ b/zorg/jenkins/build.py
@@ -633,6 +633,8 @@ def fetch_compiler():
print "Decompressing..."
if not os.path.exists(conf.workspace + "/host-compiler"):
os.mkdir(conf.workspace + "/host-compiler")
+ else:
+ shutil.rmtree(conf.workspace + "/host-compiler")
run_cmd(conf.workspace + "/host-compiler/", ['tar', 'zxf', "../" + local_name])
os.unlink(local_name)
footer()
@@ -678,6 +680,7 @@ def build_upload_artifact():
run_cmd(conf.workspace, ln_cmd)
+
def run_cmd(working_dir, cmd, env=None, sudo=False, err_okay=False):
"""Run a command in a working directory, and make sure it returns zero."""
assert type(cmd) == list, "Not a list: {}".format(type(cmd))