Bug 9136

Summary: import bb error inside oeqa/utils/commands.py
Product: [QA/Testing] Runtime Testing Reporter: Costin <costin.c.constantin>
Component: generalAssignee: Alexandru Georgescu <alexandru.c.georgescu>
Status: VERIFIED FIXED QA Contact: Costin <costin.c.constantin>
Severity: critical    
Priority: Undecided CC: bogdanx.a.voiculescu, richard.purdie
Version: 2.1   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Costin 2016-02-18 09:33:24 UTC
Hello,

Tested on poky hash 152914f2983c5d69001de1d46ce99547fa1e75fe

All our auto-testing env. is down because of "import bb" inside commands.py. 
On our auto-test env. we have a script inside build dir. that uses commands.py  module.

Steps to reproduce:

1) cd to poky dir. and source env. 
2) inside build dir. edit a test.py file and insert:

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'meta/lib')))
from oeqa.utils.commands import Command, runCmd, get_bb_var, get_test_layer, bitbake

3) python test.py and the result is:
"
...
meta/lib/oeqa/utils/commands.py", line 21, in <module>
    import bb
ImportError: No module named bb
"

With no "import bb" inside commands.py works fine (tested on an earlier commit: 5b12268f6e17574999f91628a60e21711cf62ee4)
Comment 2 Costin 2016-02-18 10:37:06 UTC
Marking it as resolved. 
The issue was that our local script didn't had bitbake/lib in sys.path
Comment 3 Costin 2016-02-18 10:37:23 UTC
marking as verified