Skip to contentSkip to conversation

buildsteps: fix passing timeout arg for two steps

PATCH In review Stefan Stanacar 2 participants 2 messages May 24, 2013

lore
Share & tools
lore
#0 lore raw

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)

---
 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
index 1846764..1bdb0f0 100644
@@ -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
index d6476d6..5df2a7c 100644
@@ -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
index 1a428be..82fb044 100644
@@ -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
#1 lore raw

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)

---
 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
index 1846764..1bdb0f0 100644
@@ -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
index d6476d6..5df2a7c 100644
@@ -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
index 1a428be..82fb044 100644
@@ -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