Bug 12401 - Most test cases fail when oe-selftest comes from a tarball
Summary: Most test cases fail when oe-selftest comes from a tarball
Status: RESOLVED NOTABUG
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: Future
Assignee: Anuj Mittal
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-12-06 16:16 UTC by Leonardo Sandoval Gonzalez
Modified: 2018-03-21 03:42 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Log obtained when running oe-selftest -a when the latter comes from a release tarball (516.94 KB, text/x-log)
2017-12-06 16:27 UTC, Leonardo Sandoval Gonzalez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Sandoval Gonzalez 2017-12-06 16:16:01 UTC
Most selftest cases fail when executed with oe-selftest **and** the latter is part of the  tarball release [1]

This is the exception shown which present multiple times, one for each test case:

2017-12-06 08:05:50,467 - oe-selftest - INFO - ======================================================================
2017-12-06 08:05:50,467 - oe-selftest - INFO - ERROR: test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2017-12-06 08:05:50,467 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-12-06 08:05:50,467 - oe-selftest - INFO - Traceback (most recent call last):
  File "/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/core/case.py", line 41, in _oeSetUp
    self.setUpMethod()
  File "/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/selftest/case.py", line 131, in setUp
    for root, _, files in os.walk(self.testlayer_path):
  File "/usr/lib64/python3.4/os.py", line 371, in walk
    if isdir(join(top, name)):
  File "/usr/lib64/python3.4/posixpath.py", line 82, in join
    path += b
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

[1] http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/poky-rocko-18.0.0.tar.bz2
Comment 1 Leonardo Sandoval Gonzalez 2017-12-06 16:27:00 UTC
Created attachment 4147 [details]
Log obtained when running oe-selftest -a when the latter comes from a release tarball
Comment 2 Ross Burton 2017-12-07 16:12:08 UTC
They're all failing in the common setup at least...
Comment 3 Anuj Mittal 2018-03-19 02:07:31 UTC
I came across this bug while searching for something and tried it out. I can't reproduce this.

From the log attached, it looks like paths included were from two different setups:

2017-12-06 08:02:26,673 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2017-12-06 08:02:33,575 - oe-selftest - INFO - Adding layer libraries:
2017-12-06 08:02:33,575 - oe-selftest - INFO - 	/home/lsandov1/poky-testing/poky-parallel-selftest/meta/lib
2017-12-06 08:02:33,575 - oe-selftest - INFO - 	/home/lsandov1/poky-testing/poky-parallel-selftest/meta-yocto-bsp/lib
2017-12-06 08:02:33,576 - oe-selftest - INFO - Running bitbake -p
2017-12-06 08:02:35,078 - oe-selftest - INFO - Adding: "include selftest.inc" in /home/lsandov1/tmp/poky-rocko-18.0.0/build/conf/local.conf
2017-12-06 08:02:35,078 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
Comment 4 Leonardo Sandoval Gonzalez 2018-03-19 19:57:48 UTC
right, so this means that on my setup there was some variable (BB*) polluting the environment. Perhaps I hit into another bug? setting twice the environment causes the second to fail?
Comment 5 Anuj Mittal 2018-03-19 20:32:44 UTC
(In reply to comment #4)
> right, so this means that on my setup there was some variable (BB*)
> polluting the environment. Perhaps I hit into another bug? setting twice the
> environment causes the second to fail?

Yes, please see bug 12163.

BBPATH wasn't exported from the tarball resulting in selftest scripts/layer to use the old BBPATH that may have been pointing to another builddir.
Comment 6 Anuj Mittal 2018-03-21 03:42:57 UTC
Marking this as resolved.