<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8639</bug_id>
          
          <creation_ts>2015-11-04 13:35:16 +0000</creation_ts>
          <short_desc>2 oe-selftest TCs (test_layer_appends &amp; test_devtool_update_recipe_git) fail if ran from a build dir that is not inside poky</short_desc>
          <delta_ts>2015-11-18 09:06:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1</target_milestone>
          
          <blocked>8525</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Istrate">daniel.alexandrux.istrate</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
          
          <qa_contact name="Daniel Istrate">daniel.alexandrux.istrate</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56181</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-11-04 13:35:16 +0000</bug_when>
    <thetext>As of: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1

Oe-selftest TCs test_layer_appends &amp; test_devtool_update_recipe_git fail if run from a build dir that is not inside poky.

[daniel@fedora-ws build-outside-poky]$ pwd
/media/ssd/build-outside-poky
[daniel@fedora-ws build-outside-poky]$ oe-selftest --run-tests devtool.DevtoolTests.test_devtool_update_recipe_git
2015-11-04 15:22:52,591 - selftest - INFO - Running bitbake -e to get BBPATH
2015-11-04 15:22:53,587 - selftest - INFO - Checking that everything is in order before running the tests
2015-11-04 15:22:54,613 - selftest - INFO - Running bitbake -p
2015-11-04 15:23:33,408 - selftest - INFO - Loading tests from: oeqa.selftest.devtool.DevtoolTests.test_devtool_update_recipe_git
2015-11-04 15:23:33,416 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
2015-11-04 15:23:33,416 - selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2015-11-04 15:23:33 - test_devtool_update_recipe_git (oeqa.selftest.devtool.DevtoolTests) ... FAIL

======================================================================
FAIL: test_devtool_update_recipe_git (oeqa.selftest.devtool.DevtoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/daniel/poky/meta/lib/oeqa/utils/decorators.py&quot;, line 106, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/home/daniel/poky/meta/lib/oeqa/selftest/devtool.py&quot;, line 585, in test_devtool_update_recipe_git
    result = runCmd(&apos;git rev-parse --show-toplevel&apos;)
  File &quot;/home/daniel/poky/meta/lib/oeqa/utils/commands.py&quot;, line 105, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, result.output))
AssertionError: Command &apos;git rev-parse --show-toplevel&apos; returned non-zero exit status 128:
fatal: Not a git repository (or any parent up to mount point /media/ssd)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

----------------------------------------------------------------------
Ran 1 test in 31.132s

FAILED (failures=1)
2015-11-04 15:24:04,549 - selftest - INFO - Finished
2015-11-04 15:24:04,549 - selftest - INFO - Removing the include from local.conf
2015-11-04 15:24:04,550 - selftest - INFO - Removing the include from bblayers.conf
[daniel@fedora-ws build-outside-poky]$ oe-selftest --run-tests layerappend.LayerAppendTests.test_layer_appends
2015-11-04 15:25:19,002 - selftest - INFO - Running bitbake -e to get BBPATH
2015-11-04 15:25:20,197 - selftest - INFO - Checking that everything is in order before running the tests
2015-11-04 15:25:21,239 - selftest - INFO - Running bitbake -p
2015-11-04 15:25:25,305 - selftest - INFO - Loading tests from: oeqa.selftest.layerappend.LayerAppendTests.test_layer_appends
2015-11-04 15:25:25,306 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
2015-11-04 15:25:25,306 - selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2015-11-04 15:25:25 - test_layer_appends (oeqa.selftest.layerappend.LayerAppendTests) ... FAIL

======================================================================
FAIL: test_layer_appends (oeqa.selftest.layerappend.LayerAppendTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/daniel/poky/meta/lib/oeqa/utils/decorators.py&quot;, line 106, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/home/daniel/poky/meta/lib/oeqa/selftest/layerappend.py&quot;, line 83, in test_layer_appends
    bitbake(&quot;layerappendtest&quot;)
  File &quot;/home/daniel/poky/meta/lib/oeqa/utils/commands.py&quot;, line 127, in bitbake
    return runCmd(cmd, ignore_status, timeout, **options)
  File &quot;/home/daniel/poky/meta/lib/oeqa/utils/commands.py&quot;, line 105, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, result.output))
AssertionError: Command &apos;bitbake  layerappendtest&apos; returned non-zero exit status 1:
ERROR: Traceback (most recent call last):
  File &quot;/home/daniel/poky/bitbake/lib/bb/cookerdata.py&quot;, line 178, in wrapped
    return func(fn, *args)
  File &quot;/home/daniel/poky/bitbake/lib/bb/cookerdata.py&quot;, line 200, in parse_config_file
    return bb.parse.handle(fn, data, include)
  File &quot;/home/daniel/poky/bitbake/lib/bb/parse/__init__.py&quot;, line 113, in handle
    return h[&apos;handle&apos;](fn, data, include)
  File &quot;/home/daniel/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 124, in handle
    abs_fn = resolve_file(fn, data)
  File &quot;/home/daniel/poky/bitbake/lib/bb/parse/__init__.py&quot;, line 136, in resolve_file
    raise IOError(errno.ENOENT, &quot;file %s not found&quot; % fn)
IOError: [Errno 2] file /media/ssd/build-outside-poky/../meta-layertest0/conf/layer.conf not found

ERROR: Unable to parse /media/ssd/build-outside-poky/../meta-layertest0/conf/layer.conf: [Errno 2] file /media/ssd/build-outside-poky/../meta-layertest0/conf/layer.conf not found

----------------------------------------------------------------------
Ran 1 test in 2.642s

FAILED (failures=1)
2015-11-04 15:25:27,948 - selftest - INFO - Finished
2015-11-04 15:25:27,948 - selftest - INFO - Removing the include from local.conf
2015-11-04 15:25:27,949 - selftest - INFO - Removing the include from bblayers.conf
[daniel@fedora-ws build-outside-poky]$ 


If the build dir is inside poky, these two TCs are passing.

[daniel@fedora-ws build-inside-poky]$ pwd
/home/daniel/poky/build-inside-poky
[daniel@fedora-ws build-inside-poky]$ oe-selftest --run-tests devtool.DevtoolTests.test_devtool_update_recipe_git
2015-11-04 15:21:07,963 - selftest - INFO - Running bitbake -e to get BBPATH
2015-11-04 15:21:09,040 - selftest - INFO - Checking that everything is in order before running the tests
2015-11-04 15:21:09,997 - selftest - INFO - Running bitbake -p
2015-11-04 15:21:54,717 - selftest - INFO - Loading tests from: oeqa.selftest.devtool.DevtoolTests.test_devtool_update_recipe_git
2015-11-04 15:21:54,723 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
2015-11-04 15:21:54,723 - selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2015-11-04 15:21:54 - test_devtool_update_recipe_git (oeqa.selftest.devtool.DevtoolTests) ... ok

----------------------------------------------------------------------
Ran 1 test in 31.398s

OK
2015-11-04 15:22:26,121 - selftest - INFO - Finished
2015-11-04 15:22:26,121 - selftest - INFO - Removing the include from local.conf
2015-11-04 15:22:26,122 - selftest - INFO - Removing the include from bblayers.conf
[daniel@fedora-ws build-inside-poky]$ oe-selftest --run-tests layerappend.LayerAppendTests.test_layer_appends
2015-11-04 15:24:29,026 - selftest - INFO - Running bitbake -e to get BBPATH
2015-11-04 15:24:30,226 - selftest - INFO - Checking that everything is in order before running the tests
2015-11-04 15:24:31,352 - selftest - INFO - Running bitbake -p
2015-11-04 15:24:35,302 - selftest - INFO - Loading tests from: oeqa.selftest.layerappend.LayerAppendTests.test_layer_appends
2015-11-04 15:24:35,313 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
2015-11-04 15:24:35,313 - selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2015-11-04 15:24:35 - test_layer_appends (oeqa.selftest.layerappend.LayerAppendTests) ... ok

----------------------------------------------------------------------
Ran 1 test in 34.061s

OK
2015-11-04 15:25:09,374 - selftest - INFO - Finished
2015-11-04 15:25:09,374 - selftest - INFO - Removing the include from local.conf
2015-11-04 15:25:09,375 - selftest - INFO - Removing the include from bblayers.conf
[daniel@fedora-ws build-inside-poky]$ 

Tested on Ubuntu 15.04 x86_64 and Fedora 21 x86_64.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56182</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-04 13:38:13 +0000</bug_when>
    <thetext>CCing Paul as these are devtool tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56196</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-11-04 15:11:45 +0000</bug_when>
    <thetext>I have a fix for both of these already, shall send out after the release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56556</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-11-17 17:27:05 +0000</bug_when>
    <thetext>Fixes merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=480bbaee580e036ba59940d39cc770c13990f3b6
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=a301f6e3b840e3b748fff5ccb68c645e87013105</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56567</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-11-18 09:06:58 +0000</bug_when>
    <thetext>Verified on master: d9aabf9639510fdb3e2ccc21ba5ae4aa9f6e4a57

The tests are now passing if run from a builddir outside poky.

[daniel@fedora-ws poky-build]$ oe-selftest --run-tests devtool.DevtoolTests.test_devtool_update_recipe_git
2015-11-18 11:04:15,221 - selftest - INFO - Running bitbake -e to get BBPATH
2015-11-18 11:04:16,850 - selftest - INFO - Checking that everything is in order before running the tests
2015-11-18 11:04:18,322 - selftest - INFO - Running bitbake -p
2015-11-18 11:04:38,730 - selftest - INFO - Loading tests from: oeqa.selftest.devtool.DevtoolTests.test_devtool_update_recipe_git
2015-11-18 11:04:38,742 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
2015-11-18 11:04:38,742 - selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2015-11-18 11:04:38 - test_devtool_update_recipe_git (oeqa.selftest.devtool.DevtoolTests) ... ok

----------------------------------------------------------------------
Ran 1 test in 40.160s

OK
2015-11-18 11:05:18,902 - selftest - INFO - Finished
2015-11-18 11:05:18,903 - selftest - INFO - Removing the include from local.conf
2015-11-18 11:05:18,903 - selftest - INFO - Removing the include from bblayers.conf
[daniel@fedora-ws poky-build]$ oe-selftest --run-tests layerappend.LayerAppendTests.test_layer_appends
2015-11-18 11:05:41,558 - selftest - INFO - Running bitbake -e to get BBPATH
2015-11-18 11:05:43,200 - selftest - INFO - Checking that everything is in order before running the tests
2015-11-18 11:05:44,699 - selftest - INFO - Running bitbake -p
2015-11-18 11:05:50,256 - selftest - INFO - Loading tests from: oeqa.selftest.layerappend.LayerAppendTests.test_layer_appends
2015-11-18 11:05:50,258 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
2015-11-18 11:05:50,258 - selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
2015-11-18 11:05:50 - test_layer_appends (oeqa.selftest.layerappend.LayerAppendTests) ... ok

----------------------------------------------------------------------
Ran 1 test in 52.276s

OK
2015-11-18 11:06:42,535 - selftest - INFO - Finished
2015-11-18 11:06:42,535 - selftest - INFO - Removing the include from local.conf
2015-11-18 11:06:42,535 - selftest - INFO - Removing the include from bblayers.conf
[daniel@fedora-ws poky-build]$ pwd
/media/ssd/poky-build</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>