Bug 10432

Summary: eSDK test test_install_libraries_headers fail when distro is nodistro
Product: [QA/Testing] Build Testing Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: generalAssignee: Francisco Pedraza <francisco.j.pedraza.gonzalez>
Status: VERIFIED FIXED QA Contact: Jose Perez C <jose.perez.carranza>
Severity: normal    
Priority: Medium+ CC: bluelightning, francisco.j.pedraza.gonzalez
Version: 2.2   
Target Milestone: 2.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
oe-selftest full log when DISTRO=nodistro
none
Fixed, test passed on AB.DISTRO=nodistro none

Description Leonardo Sandoval Gonzalez 2016-10-13 17:33:30 UTC
Tests consists on setting DISTRO='nodistro' and running the oe-selftest script. Once this is  launched, the following error is seeing

======================================================================
FAIL: test_install_libraries_headers (oeqa.selftest.eSDK.oeSDKExtSelfTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
    return func(*args, **kwargs)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/selftest/eSDK.py", line 94, in test_install_libraries_headers
    oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/selftest/eSDK.py", line 39, in run_esdk_cmd
    runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/utils/commands.py", line 114, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'cd /tmp/eSDKQA2q0mpugy; . /tmp/eSDKQA2q0mpugy/environment-setup-core2-64-oe-linux; devtool sdk-install bc ' returned non-zero exit status 1:
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.


For some reason, the recipe 'bc' cannot be built using devtool (under the eSDK environment) and the distro is set to nodistro.
Comment 1 Leonardo Sandoval Gonzalez 2016-10-13 17:36:17 UTC
Created attachment 3475 [details]
oe-selftest full log when DISTRO=nodistro

Contains the fail related to this bug.
Comment 2 Francisco Pedraza 2016-11-03 15:05:54 UTC
Hi Leo,
Thanks I am going to work on this.
Regards,
Paco
Comment 3 Francisco Pedraza 2016-11-30 22:56:00 UTC
Debugging I got some inputs that are valuable information to resolve this:
1. In a build directory I generated eSDK.
    $ bitbake core-image-minimal -c populate_sdk_ext
2. After build eSDK, I installed nodistro eSDK for testing purposes.
Comment 4 Francisco Pedraza 2016-11-30 23:15:30 UTC
3. After installation of oecore-x86_64-i586-toolchain-ext-nodistro.0.sh
I proceed to Debug eSDK as per wiki describes [1]
cd /path/to/sdk/install
. ./environment-setup-<tab complete>
. ./layers/<core layer>/oe-init-build-env .
4. Try to install bc, inside eSDK. In order to be able to debug properly inside eSDK.

$ bitbake -S none bc
5. On build directory ( where eSDK was generated ), install as well bc
$ bitbake bc
6. Inside eSDK, stamps directory should be created: 
tmp-glibc/stamps/i586-oe-linux/bc/, the file we are looking for is do_populate_sysroot.sigdata (the file that we are going to compare with the file in build directory)
7. Compare signatures, on build directory type: 
$ bitbake-diffsigs PATH_TO_SSTATE_BC_populate_sysroot.tgz.siginfo PATH_TO_GENERATED_STAMP_INSIDE_eSDK_mp-glibc/stamps/i586-oe-linux/bc/

8. On eSDK, in a new shell (with .environment-setup*) type:
$ devtool sdk-install bc
If this step fails, on your "eSDK" at local.conf, assign SSTATE_MIRRORS variable with "build directory" SSTATE-CACHE directory.
Something like: 
SSTATE_MIRRORS = "file://.* file:///home/user/poky/build/sstate-cache/PATH"

link [1] - https://wiki.yoctoproject.org/wiki/Extensible_SDK_Debugging
9. Try to install again, bc
$ devtool sdk-install bc
Note: After this step "bc" should be installed successfully.
This issue has been fixed with 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10645

Running now on local ab, waiting for results in order to mark this one as resolved and verified.
Comment 5 Francisco Pedraza 2016-12-01 13:13:06 UTC
Test Passed on auto builder: I am going to mark this as Resolved and Verified.
2016-11-30 20:50:29 -   test_image_generation_binary_feeds (oeqa.selftest.eSDK.oeSDKExtSelfTest) ... OK (15.485s)
2016-11-30 20:50:45 -   test_install_libraries_headers (oeqa.selftest.eSDK.oeSDKExtSelfTest) ... OK (65.813s)
Comment 6 Francisco Pedraza 2016-12-01 13:16:54 UTC
Created attachment 3552 [details]
Fixed, test passed on AB.DISTRO=nodistro
Comment 7 Francisco Pedraza 2016-12-01 13:17:55 UTC
Test verified, passed on local auto builder. Attached  you can find results