Bug 10806

Summary: dnf tests doesn't work when exporting tests
Product: [QA/Testing] Runtime Testing Reporter: Mariano Lopez <mariano.lopez>
Component: generalAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium CC: alex.kanavin, leonardo.sandoval.gonzalez, sgw, stephano
Version: 2.2   
Target Milestone: 2.4   
Hardware: x86   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9675
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Mariano Lopez 2016-12-13 19:19:55 UTC
smart test in its setup updates the rpm index using the build environment. When exporting the tests this is not available and there is a traceback when loading the tests. This happens because the smart test module imports bb and oe, not available in exported tests.
Comment 1 Mariano Lopez 2016-12-13 19:21:03 UTC
With dnf planned for 2.3 release, I don't know if is worth the time to fix this test.
Comment 2 Benjamin Esquivel 2016-12-13 21:47:20 UTC
linking to the dnf replacing bug
Comment 3 Stephano Cetola 2016-12-14 19:16:11 UTC
The difficult part here is oe.utils.multiprocess_exec, which would have to be reproduced somewhere outside the context of "oe" and "bb". The indexing commands are called with this function so that the tests run quicker.

Paul mentioned that we could skip multiprocess if INHERIT contains "testexport". There's no explicit need to use multiprocess in this context. The rest of the calls to "bb" and "oe" could be abstracted out to oeRuntimeTest.tc with some work.
Comment 4 Alexander Kanavin 2017-02-03 20:07:15 UTC
I rewrote smart tests for dnf, so if you explain to me what 'exporting the tests' means and how to do it, I can check if it's still a valid problem.
Comment 5 Mariano Lopez 2017-03-28 21:37:01 UTC
Exporting tests is a functionality of the runtime framework, the idea is to put all the libraries and test in a directory and you can copy this folder to another host and execute the test; it is implemented in testexport bbclass.

testimage and testexport execute the same tests. So, the problem here is that in dnf tests we setup a local repository in the host running the test based paths (WORKDIR) that won't be necessarily available in a host without build environment.

Thinking about this a way to achieve this is avoid the setup of the repository in the test itself and do it in the testimage class. And in testexport you would need to specify the url of the repository server.
Comment 6 Leonardo Sandoval Gonzalez 2017-07-07 17:04:17 UTC
Alex, should we mark this as resolved/obsolete or it is still valid?
Comment 7 Alexander Kanavin 2017-07-17 12:15:13 UTC
To be honest I have no idea. Can you provide a clear set of steps to reproduce this?
Comment 8 Leonardo Sandoval Gonzalez 2017-07-17 12:52:52 UTC
based on comment  2 and comment 7, resolving as obsolete.