summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-11 11:07:57 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-12 23:10:04 +0100
commit8fc109f1cb6eb437c12d2d11a6937de6f035e296 (patch)
tree50341b9c8416331f22e014a0b0257e0cd707c3f6
parentffd295fed4ab81fc0bd00bb145ef4d72c49584bf (diff)
downloadopenembedded-core-8fc109f1cb6eb437c12d2d11a6937de6f035e296.tar.gz
openembedded-core-8fc109f1cb6eb437c12d2d11a6937de6f035e296.tar.bz2
openembedded-core-8fc109f1cb6eb437c12d2d11a6937de6f035e296.zip
scripts/contrib/devtool-stress: skip incompatible recipes
If devtool returns exit code 4 then record the recipes as "skipped" rather than "failed" - these are recipes we know cannot work (usually because they don't provide any source). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xscripts/contrib/devtool-stress.py57
1 files changed, 35 insertions, 22 deletions
diff --git a/scripts/contrib/devtool-stress.py b/scripts/contrib/devtool-stress.py
index ab77a2d1f6..5fff257f10 100755
--- a/scripts/contrib/devtool-stress.py
+++ b/scripts/contrib/devtool-stress.py
@@ -121,14 +121,18 @@ def stress_extract(args):
sys.stdout.write('Testing %s ' % (pn + ' ').ljust(40, '.'))
sys.stdout.flush()
failed = False
+ skipped = None
srctree = os.path.join(tmpdir, pn)
try:
bb.process.run('devtool extract %s %s' % (pn, srctree))
- except bb.process.CmdError as exc:
- failed = True
- with open('stress_%s_extract.log' % pn, 'w') as f:
- f.write(str(exc))
+ except bb.process.ExecutionError as exc:
+ if exc.exitcode == 4:
+ skipped = 'incompatible'
+ else:
+ failed = True
+ with open('stress_%s_extract.log' % pn, 'w') as f:
+ f.write(str(exc))
if os.path.exists(srctree):
shutil.rmtree(srctree)
@@ -136,6 +140,8 @@ def stress_extract(args):
if failed:
print('failed')
failures += 1
+ elif skipped:
+ print('skipped (%s)' % skipped)
else:
print('ok')
except KeyboardInterrupt:
@@ -162,29 +168,34 @@ def stress_modify(args):
sys.stdout.flush()
failed = False
reset = True
+ skipped = None
srctree = os.path.join(tmpdir, pn)
try:
bb.process.run('devtool modify -x %s %s' % (pn, srctree))
- except bb.process.CmdError as exc:
- with open('stress_%s_modify.log' % pn, 'w') as f:
- f.write(str(exc))
- failed = 'modify'
- reset = False
-
- if not failed:
- try:
- bb.process.run('bitbake -c install %s' % pn)
- except bb.process.CmdError as exc:
- with open('stress_%s_install.log' % pn, 'w') as f:
+ except bb.process.ExecutionError as exc:
+ if exc.exitcode == 4:
+ skipped = 'incompatible'
+ else:
+ with open('stress_%s_modify.log' % pn, 'w') as f:
f.write(str(exc))
- failed = 'build'
- if reset:
- try:
- bb.process.run('devtool reset %s' % pn)
- except bb.process.CmdError as exc:
- print('devtool reset failed: %s' % str(exc))
- break
+ failed = 'modify'
+ reset = False
+
+ if not skipped:
+ if not failed:
+ try:
+ bb.process.run('bitbake -c install %s' % pn)
+ except bb.process.CmdError as exc:
+ with open('stress_%s_install.log' % pn, 'w') as f:
+ f.write(str(exc))
+ failed = 'build'
+ if reset:
+ try:
+ bb.process.run('devtool reset %s' % pn)
+ except bb.process.CmdError as exc:
+ print('devtool reset failed: %s' % str(exc))
+ break
if os.path.exists(srctree):
shutil.rmtree(srctree)
@@ -192,6 +203,8 @@ def stress_modify(args):
if failed:
print('failed (%s)' % failed)
failures += 1
+ elif skipped:
+ print('skipped (%s)' % skipped)
else:
print('ok')
except KeyboardInterrupt: