buildsteps: fix passing timeout arg for two steps
PATCH 1/1 buildsteps: fix passing timeout arg for two steps
RunSanityTests and RunPreamble weren't passing kwargs to ShellCommand so timeout was ignored.
For RunSanityTests I've changed the default to 1200 which should be enough in most cases, but I've updated one build where two images are actually tested (btrfs and ext4)
Signed-off-by Stefan Stanacar <[email protected]>
--- buildset-config/nightly-qa-extras.conf | 2 +- lib/python2.7/site-packages/autobuilder/buildsteps/RunPreamble.py | 2 +- lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-)
buildset-config/nightly-qa-extras.conf +1 -1
@@ -11,7 +11,7 @@ steps: [{'SetDest':{}}, {'CreateAutoConf': {'machine': 'qemux86-64', 'SDKMACHINE' : 'i686', 'distro': 'poky', 'atextappend' : '\nROOT_HOME = "/root"\nIMAGE_FSTYPES = "btrfs"\nKERNEL_FEATURES_append = " cfg/fs/btrfs"\n'}}, {'CreateBBLayersConf': {'buildprovider' : 'yocto'}}, {'BuildImages': {'images': 'core-image-sato'}}, - {'RunSanityTests': {'images': 'core-image-sato'}}, + {'RunSanityTests': {'images': 'core-image-sato', 'timeout' : '2400'}}, {'CreateAutoConf': {'machine': 'qemux86-64', 'SDKMACHINE' : 'i686', 'distro': 'poky', 'atextappend' : '\nIMAGE_FEATURES_append = " read-only-rootfs"\n'}}, {'BuildImages': {'images': 'core-image-sato'}}, {'RunSanityTests': {'images': 'core-image-sato', 'scene' : 'sanity:boot sanity:ssh'}}]
lib/python2.7/site-packages/autobuilder/buildsteps/RunPreamble.py +1 -1
@@ -30,7 +30,7 @@ class RunPreamble(ShellCommand): # Timeout needs to be passed to LoggingBuildStep as a kwarg self.timeout = 100000 kwargs['timeout']=self.timeout - ShellCommand.__init__(self) + ShellCommand.__init__(self, **kwargs) def describe(self, done=False): description = ShellCommand.describe(self,done)
lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py +3 -2
@@ -24,6 +24,8 @@ class RunSanityTests(ShellCommand): self.factory = factory self.images="" self.scene=None + # the default of 1200 seconds is enough for running sanity tests in most cases + self.timeout = 1200 for k, v in argdict.iteritems(): setattr(self, k, v) self.description = "Running Sanity Tests"
@@ -36,10 +38,9 @@ class RunSanityTests(ShellCommand): command = command + "echo 'TEST_SCEN = \"" + self.scene + "\"'" + " >> ./conf/auto.conf;" command = command + "DISPLAY=localhost:1 bitbake " + self.images + " -c qemuimagetest_standalone" # Timeout needs to be passed to LoggingBuildStep as a kwarg - self.timeout = 100000 kwargs['timeout']=self.timeout self.command = command - ShellCommand.__init__(self) + ShellCommand.__init__(self, **kwargs) def describe(self, done=False): description = ShellCommand.describe(self,done)
Signature · 1 line
1.8.1.4
merged. Thanks!
-b
Quoted 67 lines · Stefan Stanacar
RunSanityTests and RunPreamble weren't passing kwargs to ShellCommand so timeout was ignored.
For RunSanityTests I've changed the default to 1200 which should be enough in most cases, but I've updated one build where two images are actually tested (btrfs and ext4)Signed-off-by Stefan Stanacar <[email protected]>--- buildset-config/nightly-qa-extras.conf | 2 +- lib/python2.7/site-packages/autobuilder/buildsteps/RunPreamble.py | 2 +- lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-)buildset-config/nightly-qa-extras.conf +1
-1@@ -11,7 +11,7 @@ steps: [{'SetDest':{}}, {'CreateAutoConf': {'machine': 'qemux86-64', 'SDKMACHINE' : 'i686', 'distro': 'poky', 'atextappend' : '\nROOT_HOME = "/root"\nIMAGE_FSTYPES = "btrfs"\nKERNEL_FEATURES_append = " cfg/fs/btrfs"\n'}}, {'CreateBBLayersConf': {'buildprovider' : 'yocto'}}, {'BuildImages': {'images': 'core-image-sato'}}, - {'RunSanityTests': {'images': 'core-image-sato'}}, + {'RunSanityTests': {'images': 'core-image-sato', 'timeout' : '2400'}}, {'CreateAutoConf': {'machine': 'qemux86-64', 'SDKMACHINE' : 'i686', 'distro': 'poky', 'atextappend' : '\nIMAGE_FEATURES_append = " read-only-rootfs"\n'}}, {'BuildImages': {'images': 'core-image-sato'}}, {'RunSanityTests': {'images': 'core-image-sato', 'scene' : 'sanity:boot sanity:ssh'}}]lib/python2.7/site-packages/autobuilder/buildsteps/RunPreamble.py +1
-1@@ -30,7 +30,7 @@ class RunPreamble(ShellCommand): # Timeout needs to be passed to LoggingBuildStep as a kwarg self.timeout = 100000 kwargs['timeout']=self.timeout - ShellCommand.__init__(self) + ShellCommand.__init__(self, **kwargs) def describe(self, done=False): description = ShellCommand.describe(self,done)lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py +3
-3@@ -24,6 +24,8 @@ class RunSanityTests(ShellCommand): self.factory = factory self.images="" self.scene=None + # the default of 1200 seconds is enough for running sanity tests in most cases + self.timeout = 1200 for k, v in argdict.iteritems(): setattr(self, k, v) self.description = "Running Sanity Tests"@@ -36,10 +38,9 @@ class RunSanityTests(ShellCommand): command = command + "echo 'TEST_SCEN = \"" + self.scene + "\"'" + " >> ./conf/auto.conf;" command = command + "DISPLAY=localhost:1 bitbake " + self.images + " -c qemuimagetest_standalone" # Timeout needs to be passed to LoggingBuildStep as a kwarg - self.timeout = 100000 kwargs['timeout']=self.timeout self.command = command - ShellCommand.__init__(self) + ShellCommand.__init__(self, **kwargs) def describe(self, done=False): description = ShellCommand.describe(self,done) --1.8.1.4
Signature · 3 lines
Elizabeth Flanagan Yocto Project Build and Release