Do not recompile if firmware is already there
Always print filename on compile error so that the email handler can attach the error log
This commit is contained in:
@@ -202,6 +202,7 @@ def build_firmware(path):
|
|||||||
file(outpath, "a").write("\n".join(cmd) + output + error)
|
file(outpath, "a").write("\n".join(cmd) + output + error)
|
||||||
else:
|
else:
|
||||||
file(errpath, "w").write(output + error)
|
file(errpath, "w").write(output + error)
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
# Launch make
|
# Launch make
|
||||||
@@ -212,6 +213,7 @@ def build_firmware(path):
|
|||||||
file(outpath, "a").write(output + error)
|
file(outpath, "a").write(output + error)
|
||||||
else:
|
else:
|
||||||
file(errpath, "w").write(output + error)
|
file(errpath, "w").write(output + error)
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
if what == "firmware":
|
if what == "firmware":
|
||||||
@@ -228,6 +230,7 @@ def build_firmware(path):
|
|||||||
shutil.move(target, path)
|
shutil.move(target, path)
|
||||||
|
|
||||||
if os.path.isfile(errpath):
|
if os.path.isfile(errpath):
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
lockpath = path + ".lock"
|
lockpath = path + ".lock"
|
||||||
@@ -236,7 +239,11 @@ try:
|
|||||||
with lock.acquire(timeout = 60*60):
|
with lock.acquire(timeout = 60*60):
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
build_firmware(path)
|
build_firmware(path)
|
||||||
|
else:
|
||||||
|
print filename
|
||||||
|
exit(0)
|
||||||
except filelock.Timeout:
|
except filelock.Timeout:
|
||||||
|
print filename
|
||||||
exit(COMPILATION_ERROR)
|
exit(COMPILATION_ERROR)
|
||||||
|
|
||||||
print filename
|
print filename
|
||||||
|
|||||||
Reference in New Issue
Block a user