]> code.ossystems Code Review - openembedded-core.git/commit
wic: selftest: account for occasional newline in debugfs file names
authorMaciej Borzecki <maciej.borzecki@rndity.com>
Mon, 13 Mar 2017 10:19:23 +0000 (11:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Mar 2017 14:39:34 +0000 (14:39 +0000)
commit477805b913a6c4b4b630e42f08cd9e59f1e4e254
tree495d0846eb3919e3d489ffb621e79e7da345a249
parent13a5c3dac4b5b0ccb4c5dfebf79b468acd8e1983
wic: selftest: account for occasional newline in debugfs file names

Debugfs output may contain a newline in file names in 'ls -p' output. Make sure
that output is correctly split into lines by matching '/\n' and newlines are
removed from file names.

Fixes the following error appearing in AB tests:

   Traceback (most recent call last):
     File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 388, in test_exclude_path
       files = [line.split('/')[5] for line in res.output.split('\n')]
     File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 388, in <listcomp>
       files = [line.split('/')[5] for line in res.output.split('\n')]
   IndexError: list index out of range

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/wic.py