Bug 12928 - bitbake-selftest with network disabled doesn't work
Summary: bitbake-selftest with network disabled doesn't work
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.6
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 2.6 M4
Assignee: Mark Hatle
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-09-22 15:10 UTC by Richard Purdie
Modified: 2018-09-27 14:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2018-09-22 15:10:12 UTC
If I run:

BB_SKIP_NETTESTS=yes bitbake-selftest

I see:

Unset BB_SKIP_NETTESTS to run network tests
....................................................................................................................................................................................................................................ssss........sssssssssssssss.........s.....s.......................................................................E
Stdout:
Looking for collection core...
E
Stdout:
Looking for layerbranch openembedded-core...
....
======================================================================
ERROR: test_find_collection (layerindexlib.tests.restapi.LayerIndexWebRestApiTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/build1/poky/bitbake/lib/layerindexlib/tests/restapi.py", line 150, in test_find_collection
    _check(collection, result)
  File "/media/build1/poky/bitbake/lib/layerindexlib/tests/restapi.py", line 136, in _check
    result = self.layerindex.find_collection(collection)
AttributeError: 'LayerIndexWebRestApiTest' object has no attribute 'layerindex'

Stdout:
Looking for collection core...

======================================================================
ERROR: test_find_layerbranch (layerindexlib.tests.restapi.LayerIndexWebRestApiTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/build1/poky/bitbake/lib/layerindexlib/tests/restapi.py", line 173, in test_find_layerbranch
    _check(collection, result)
  File "/media/build1/poky/bitbake/lib/layerindexlib/tests/restapi.py", line 156, in _check
    for index in self.layerindex.indexes:
AttributeError: 'LayerIndexWebRestApiTest' object has no attribute 'layerindex'

Stdout:
Looking for layerbranch openembedded-core...

----------------------------------------------------------------------
Ran 348 tests in 20.443s

whereas bitbake-selftest with the network tests enabled works just fine. We should fix this. I suspect its a bug Mark introduced with the new tests for the layerindex.
Comment 1 Mark Hatle 2018-09-25 15:09:24 UTC
patch send to bitbake-devel list for review.

changes also available at bitbake-contrib  mgh/12928 branch