Optionally, don't cleanup after build, helps debugging.
Debug file dumps should be done outside cpt.
This commit is contained in:
parent
109812d223
commit
6e23bb5f1e
@ -153,7 +153,7 @@ script:
|
||||
git push --force https://$OAUTH_TOKEN@github.com/${TRAVIS_REPO_SLUG} cling-nightlies
|
||||
fi
|
||||
|
||||
timeout $TIMEOUT tools/packaging/cpt.py --current-dev=tar --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG --verbose --debug-on-error
|
||||
timeout $TIMEOUT tools/packaging/cpt.py --current-dev=tar --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG --verbose --skip-cleanup
|
||||
else
|
||||
tools/packaging/cpt.py --tarball-tag=$TRAVIS_TAG --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG
|
||||
fi
|
||||
|
@ -67,26 +67,11 @@ def _convert_subprocess_cmd(cmd):
|
||||
else:
|
||||
return shlex.split(cmd, posix=True, comments=True)
|
||||
|
||||
def _pdebug_info():
|
||||
box_draw("Printing debug information")
|
||||
|
||||
print("Printing CMakeOutput.log")
|
||||
with open(os.path.join(LLVM_OBJ_ROOT, 'CMakeFiles', 'CMakeOutput.log'), 'r') as f:
|
||||
print(f.read())
|
||||
|
||||
print("Printing CMakeError.log")
|
||||
with open(os.path.join(LLVM_OBJ_ROOT, 'CMakeFiles', 'CMakeError.log'), 'r') as f:
|
||||
print(f.read())
|
||||
|
||||
|
||||
def _perror(e):
|
||||
print("subprocess.CalledProcessError: Command '%s' returned non-zero exit status %s" % (
|
||||
' '.join(e.cmd), str(e.returncode)))
|
||||
# Print out some useful information, while keeping all files around in --debug-on-error.
|
||||
if args['debug_on_error']:
|
||||
_pdebug_info()
|
||||
else:
|
||||
cleanup()
|
||||
cleanup()
|
||||
# Communicate return code to the calling program if any
|
||||
sys.exit(e.returncode)
|
||||
|
||||
@ -499,6 +484,10 @@ def tarball():
|
||||
|
||||
def cleanup():
|
||||
print('\n')
|
||||
if args['skip_cleanup']:
|
||||
box_draw("Skipping cleanup")
|
||||
return
|
||||
|
||||
box_draw("Clean up")
|
||||
if os.path.isdir(os.path.join(workdir, 'builddir')):
|
||||
print("Skipping build directory: " + os.path.join(workdir, 'builddir'))
|
||||
@ -1513,7 +1502,7 @@ parser.add_argument('--with-cling-url', action='store', help='Specify an alterna
|
||||
default='https://github.com/vgvassilev/cling.git')
|
||||
|
||||
parser.add_argument('--no-test', help='Do not run test suite of Cling', action='store_true')
|
||||
parser.add_argument('--debug-on-error', help='Print debug information on error', action='store_true')
|
||||
parser.add_argument('--skip-cleanup', help='Do not clean up after a build', action='store_true')
|
||||
parser.add_argument('--use-wget', help='Do not use Git to fetch sources', action='store_true')
|
||||
parser.add_argument('--create-dev-env', help='Set up a release/debug environment')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user