From d191d6bfc1fd82d94440de285e007652f4ad99a0 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 11 Apr 2012 18:29:19 +0200 Subject: [PATCH] make test results available in jenkins --- debian_build.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/debian_build.py b/debian_build.py index f9c0e31..bcca4e2 100755 --- a/debian_build.py +++ b/debian_build.py @@ -442,8 +442,17 @@ if __name__ == '__main__': 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/'): -- 2.39.5