mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tools - make.py print tail of packing log on error (#9351)
This commit is contained in:
parent
fdb7330385
commit
882294e9f7
@ -40,6 +40,7 @@ if sys.version_info[0] == 2:
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
import pathlib
|
||||||
import shutil
|
import shutil
|
||||||
import platform
|
import platform
|
||||||
import glob
|
import glob
|
||||||
@ -1538,6 +1539,16 @@ See the make.cfg file for additional build options.
|
|||||||
if len(failedBuilds) > 0:
|
if len(failedBuilds) > 0:
|
||||||
for failedBuild in failedBuilds:
|
for failedBuild in failedBuilds:
|
||||||
print("- {} build failed!".format(failedBuild))
|
print("- {} build failed!".format(failedBuild))
|
||||||
|
failedBuild_path = pathlib.Path(
|
||||||
|
"P:/temp").joinpath(f"{failedBuild}.packing.log")
|
||||||
|
if (failedBuild_path.exists()):
|
||||||
|
print(f" Log {failedBuild_path} tail:")
|
||||||
|
with open(failedBuild_path) as failedBuild_file:
|
||||||
|
lines = failedBuild_file.readlines()
|
||||||
|
for index, line in enumerate(lines[-3:]):
|
||||||
|
print(f" {len(lines) + index -2}: {line}", end='')
|
||||||
|
else:
|
||||||
|
print(f" Log {failedBuild_path} does not exist")
|
||||||
if len(missingFiles) > 0:
|
if len(missingFiles) > 0:
|
||||||
for missingFile in missingFiles:
|
for missingFile in missingFiles:
|
||||||
print("- {} not found!".format(missingFile))
|
print("- {} not found!".format(missingFile))
|
||||||
|
Loading…
Reference in New Issue
Block a user