summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-07-05 08:00:09 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-07-05 08:00:09 +0200
commita8fed9bcf8daa319ae86f33198530b8e170e2b00 (patch)
treebeadf3ba9a425455342ee0847c34cc340bf2edaf
parentaa4fed593d12a55ddd6efff70c81275851d872dd (diff)
runner: Run make clean before rebuilding
-rw-r--r--lib/runner.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/runner.py b/lib/runner.py
index 19b88f3..baf4d16 100644
--- a/lib/runner.py
+++ b/lib/runner.py
@@ -155,6 +155,12 @@ class ShellMonitor:
pass
def build(arch, app, opts = []):
+ command = ['make', 'arch={}'.format(arch), 'app={}'.format(app), 'clean']
+ command.extend(opts)
+ res = subprocess.run(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE,
+ universal_newlines = True)
+ if res.returncode != 0:
+ raise RuntimeError('Build failure: ' + res.stderr)
command = ['make', '-B', 'arch={}'.format(arch), 'app={}'.format(app)]
command.extend(opts)
res = subprocess.run(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE,