else:
logger.debug('git-buildpackage executed successfully')
- # FIXME: if reports.tgz exists untar it to workspace and delete it.
- # tar xzvf ../build-area/result/reports.tgz 2>/dev/null|| true
+ # make test results available in jenkins:
+ #
+ # if reports.tgz exists untar it to workspace and delete it.
+ # reports.tgz is generated by /root/.pbuilder/hooks.d/B01-test
+ cmd = ['/bin/tar', 'xzvf', os.path.join(CWD, '../build-area/result/reports.tgz'), '-C', CWD]
+ try:
+ subprocess.check_call(cmd)
+ cmd = ['/bin/rm', os.path.join(CWD, '../build-area/result/reports.tgz')]
+ subprocess.check_call(cmd)
+ except:
+ pass
# build was succesful, now let's tag it
if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):