From: Thierry Parmentelat Date: Sat, 12 Jun 2010 21:03:57 +0000 (+0200) Subject: turn off the SFA tests when this is not redone X-Git-Tag: tests-5.0-6~14 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=001ee51172a3d6ad6d5f6b5703ebc5057e3adefe;p=tests.git turn off the SFA tests when this is not redone --- diff --git a/system/TestMain.py b/system/TestMain.py index 4839b43..440f9ee 100755 --- a/system/TestMain.py +++ b/system/TestMain.py @@ -186,6 +186,8 @@ steps refer to a method in TestPlc or to a step_* module if self.options.verbose: utils.header('* Using %s = %s'%(recname,getattr(self.options,recname))) + # hack : if sfa is not among the published rpms, skip these tests + TestPlc.check_whether_build_has_sfa(options.arch_rpms_url) # steps if not self.options.steps: diff --git a/system/TestPlc.py b/system/TestPlc.py index eb5c9e3..6127da7 100644 --- a/system/TestPlc.py +++ b/system/TestPlc.py @@ -120,6 +120,16 @@ class TestPlc: def valid_step (step): return step != SEP + # turn off the sfa-related steps when build has skipped SFA + # this is originally for centos5 as recent SFAs won't build on this platformb + @staticmethod + def check_build_has_sfa (rpms_url): + retcod=os.system ("curl --silent %s/ | grep -q sfa"%rpms_url) + # full builds are expected to return with 0 here + if retcod!=0: + TestPlc.default_steps = [ step for step in TestPlc.default_steps + if step.find('sfa') < 0 ] + def __init__ (self,plc_spec,options): self.plc_spec=plc_spec self.options=options