From d4a94d0cd592caac8bc1673acdc3de3d33b776f5 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Thu, 17 Jul 2014 23:46:48 +0200 Subject: [PATCH 1/2] Fix the Windows tests --- scripts/jenkins_script.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/jenkins_script.py b/scripts/jenkins_script.py index eeafbfe23..cd6a0c9cf 100755 --- a/scripts/jenkins_script.py +++ b/scripts/jenkins_script.py @@ -62,11 +62,12 @@ class OpenLPJobs(object): Branch_Pull = 'Branch-01-Pull' Branch_Functional = 'Branch-02-Functional-Tests' Branch_Interface = 'Branch-03-Interface-Tests' - Branch_Windows = 'Branch-04-Windows_Tests' + Branch_Windows_Functional = 'Branch-04a-Windows_Functional_Tests' + Branch_Windows_Interface = 'Branch-04b-Windows_Interface_Tests' Branch_PEP = 'Branch-05a-Code_Analysis' Branch_Coverage = 'Branch-05b-Test_Coverage' - Jobs = [Branch_Pull, Branch_Functional, Branch_Interface, Branch_Windows, Branch_PEP, Branch_Coverage] + Jobs = [Branch_Pull, Branch_Functional, Branch_Interface, Branch_Windows_Functional, Branch_Windows_Interface, Branch_PEP, Branch_Coverage] class Colour(object): From 2b1b8ac68615f2595266f0c7da202495e823dab2 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Thu, 17 Jul 2014 23:55:54 +0200 Subject: [PATCH 2/2] Make the script stop after a failure. --- scripts/jenkins_script.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/jenkins_script.py b/scripts/jenkins_script.py index cd6a0c9cf..6c6fdac80 100755 --- a/scripts/jenkins_script.py +++ b/scripts/jenkins_script.py @@ -115,7 +115,9 @@ class JenkinsTrigger(object): print('%s (revision %s)' % (get_repo_name(), revno)) for job in OpenLPJobs.Jobs: - self.__print_build_info(job) + if not self.__print_build_info(job): + print('Stopping after failure') + break def open_browser(self): """ @@ -132,6 +134,7 @@ class JenkinsTrigger(object): :param job_name: The name of the job we want the information from. For example *Branch-01-Pull*. Use the class variables from the :class:`OpenLPJobs` class. """ + is_success = False job = self.jenkins_instance.job(job_name) while job.info['inQueue']: time.sleep(1) @@ -140,11 +143,13 @@ class JenkinsTrigger(object): if build.info['result'] == 'SUCCESS': # Make 'SUCCESS' green. result_string = '%s%s%s' % (Colour.GREEN_START, build.info['result'], Colour.GREEN_END) + is_success = True else: # Make 'FAILURE' red. result_string = '%s%s%s' % (Colour.RED_START, build.info['result'], Colour.RED_END) url = build.info['url'] print('[%s] %s' % (result_string, url)) + return is_success def get_repo_name():