Bug 8212 - Can't run exported tests
Summary: Can't run exported tests
Status: VERIFIED FIXED
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ critical
Target Milestone: 2.0
Assignee: Lucian Musat
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks: 8194
  Show dependency tree
 
Reported: 2015-08-26 20:30 UTC by Mariano Lopez
Modified: 2015-10-26 13:19 UTC (History)
1 user (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 Mariano Lopez 2015-08-26 20:30:06 UTC
The manual mentions that it is possible to export the runtime tests and the run from any host. It's in:

http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#exporting-tests

When trying to follow the instructions I get a traceback that it can't import bb:

$ ./runexported.py testdata.json
Traceback (most recent call last):
  File "./runexported.py", line 33, in <module>
    from oeqa.oetest import runTests
  File "/home/mlopezva/repo/poky/temp2/tmp/testimage/core-image-sato/oeqa/oetest.py", line 15, in <module>
    import bb
ImportError: No module named bb


bb module was introduced to oetest.py in commit 	058e75d60e98841c8532a05006ae46725e3cdfd1. But even returning to this commit runexported.py throw an exception

http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#exporting-tests

$ ./runexported.py testdata.json
SSH log file: /home/mlopezva/repo/poky/temp/tmp/testimage/core-image-sato/ssh_target_log.20150826075658
Traceback (most recent call last):
  File "./runexported.py", line 135, in <module>
    ret = main()
  File "./runexported.py", line 129, in main
    runTests(tc)
  File "/home/mlopezva/repo/poky/temp/tmp/testimage/core-image-sato/oeqa/oetest.py", line 35, in runTests
    suite = loadTests(tc, type)
  File "/home/mlopezva/repo/poky/temp/tmp/testimage/core-image-sato/oeqa/oetest.py", line 29, in loadTests
    suite = testloader.loadTestsFromNames(tc.testslist)
  File "/usr/lib64/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
AttributeError: 'module' object has no attribute 'buildcvs'
Comment 1 Mariano Lopez 2015-09-22 15:31:33 UTC
The issue here is all the bb dependencies found in utils and runtime folders. These folders shouldn't use bb lib.
Comment 2 Lucian Musat 2015-10-05 08:33:05 UTC
Resolved in commit f1e7fb0856b2f1d403784d11332a5df9bccc74f5.
Comment 3 Costin 2015-10-26 13:19:19 UTC
Marking this as verified. 
./runexported works fine on master commit:
505a82673ac2487df5ea343a6422c2fc47018831
on an Ubuntu machine.