Bug 9136 - import bb error inside oeqa/utils/commands.py
Summary: import bb error inside oeqa/utils/commands.py
Status: VERIFIED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Undecided critical
Target Milestone: ---
Assignee: Alexandru Georgescu
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-02-18 09:33 UTC by Costin
Modified: 2016-02-22 08:26 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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