diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-05 08:00:09 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-05 08:00:09 +0200 |
commit | a8fed9bcf8daa319ae86f33198530b8e170e2b00 (patch) | |
tree | beadf3ba9a425455342ee0847c34cc340bf2edaf /lib | |
parent | aa4fed593d12a55ddd6efff70c81275851d872dd (diff) |
runner: Run make clean before rebuilding
Diffstat (limited to 'lib')
-rw-r--r-- | lib/runner.py | 6 |
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, |