<?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>11702</bug_id>
          
          <creation_ts>2017-06-22 10:48:04 +0000</creation_ts>
          <short_desc>oe-selftest fails if local.conf doesn&apos;t end with a newline</short_desc>
          <delta_ts>2017-08-29 17:16:48 +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.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</assigned_to>
          <cc>leonardo.sandoval.gonzalez</cc>
          
          
          <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>74458</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-06-22 10:48:04 +0000</bug_when>
    <thetext>If local.conf doesn&apos;t have a newline at the end, we get this error:

$ oe-selftest -r archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name
2017-06-22 11:40:18,363 - oe-selftest - INFO - Adding layer libraries:
2017-06-22 11:40:18,363 - oe-selftest - INFO - 	/media/build1/poky/meta/lib
2017-06-22 11:40:18,364 - oe-selftest - INFO - 	/media/build1/poky/meta-yocto-bsp/lib
2017-06-22 11:40:18,364 - oe-selftest - INFO - 	/media/build1/poky/meta-selftest/lib
2017-06-22 11:40:18,364 - oe-selftest - INFO - Running bitbake -p
2017-06-22 11:40:23,385 - oe-selftest - INFO - 
2017-06-22 11:40:23,386 - oe-selftest - INFO - Running tests...
2017-06-22 11:40:23,498 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-06-22 11:40:46,005 - oe-selftest - INFO -   test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver) ... ERROR (22.506s)
2017-06-22 11:40:46,006 - oe-selftest - INFO - 
2017-06-22 11:40:46,006 - oe-selftest - INFO - ======================================================================
2017-06-22 11:40:46,006 - oe-selftest - INFO - ERROR [22.506s]: test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2017-06-22 11:40:46,006 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-06-22 11:40:46,006 - oe-selftest - INFO - Traceback (most recent call last):
  File &quot;/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py&quot;, line 32, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/media/build1/poky/meta/lib/oeqa/selftest/cases/archiver.py&quot;, line 33, in test_archiver_allows_to_filter_on_recipe_name
    src_path = os.path.join(bb_vars[&apos;DEPLOY_DIR_SRC&apos;], bb_vars[&apos;TARGET_SYS&apos;])
  File &quot;/usr/lib/python3.5/posixpath.py&quot;, line 89, in join
    genericpath._check_arg_types(&apos;join&apos;, a, *p)
  File &quot;/usr/lib/python3.5/genericpath.py&quot;, line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not &apos;NoneType&apos;
2017-06-22 11:40:46,007 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-06-22 11:40:46,007 - oe-selftest - INFO - Ran 1 test in 22.507s
2017-06-22 11:40:46,007 - oe-selftest - INFO - 
2017-06-22 11:40:46,007 - oe-selftest - INFO - FAILED (errors=1)
2017-06-22 11:40:46,007 - oe-selftest - INFO - 
2017-06-22 11:40:46,007 - oe-selftest - INFO - Generating XML reports...
2017-06-22 11:40:46,011 - oe-selftest - INFO - RESULTS:
2017-06-22 11:40:46,011 - oe-selftest - INFO - RESULTS - archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name - Testcase 1345: ERROR
2017-06-22 11:40:46,011 - oe-selftest - INFO - SUMMARY:
2017-06-22 11:40:46,011 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 22.626s
2017-06-22 11:40:46,011 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed

We can likely do better than this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75159</commentid>
    <comment_count>1</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-07-19 20:24:37 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; If local.conf doesn&apos;t have a newline at the end, we get this error:
&gt; 
&gt; $ oe-selftest -r
&gt; archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name
&gt; 2017-06-22 11:40:18,363 - oe-selftest - INFO - Adding layer libraries:
&gt; 2017-06-22 11:40:18,363 - oe-selftest - INFO - 	/media/build1/poky/meta/lib
&gt; 2017-06-22 11:40:18,364 - oe-selftest - INFO - 
&gt; /media/build1/poky/meta-yocto-bsp/lib
&gt; 2017-06-22 11:40:18,364 - oe-selftest - INFO - 
&gt; /media/build1/poky/meta-selftest/lib
&gt; 2017-06-22 11:40:18,364 - oe-selftest - INFO - Running bitbake -p
&gt; 2017-06-22 11:40:23,385 - oe-selftest - INFO - 
&gt; 2017-06-22 11:40:23,386 - oe-selftest - INFO - Running tests...
&gt; 2017-06-22 11:40:23,498 - oe-selftest - INFO -
&gt; ----------------------------------------------------------------------
&gt; 2017-06-22 11:40:46,005 - oe-selftest - INFO -  
&gt; test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver) ... ERROR
&gt; (22.506s)
&gt; 2017-06-22 11:40:46,006 - oe-selftest - INFO - 
&gt; 2017-06-22 11:40:46,006 - oe-selftest - INFO -
&gt; ======================================================================
&gt; 2017-06-22 11:40:46,006 - oe-selftest - INFO - ERROR [22.506s]:
&gt; test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
&gt; 2017-06-22 11:40:46,006 - oe-selftest - INFO -
&gt; ----------------------------------------------------------------------
&gt; 2017-06-22 11:40:46,006 - oe-selftest - INFO - Traceback (most recent call
&gt; last):
&gt;   File &quot;/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py&quot;, line
&gt; 32, in wrapped_f
&gt;     return func(*args, **kwargs)
&gt;   File &quot;/media/build1/poky/meta/lib/oeqa/selftest/cases/archiver.py&quot;, line
&gt; 33, in test_archiver_allows_to_filter_on_recipe_name
&gt;     src_path = os.path.join(bb_vars[&apos;DEPLOY_DIR_SRC&apos;], bb_vars[&apos;TARGET_SYS&apos;])
&gt;   File &quot;/usr/lib/python3.5/posixpath.py&quot;, line 89, in join
&gt;     genericpath._check_arg_types(&apos;join&apos;, a, *p)
&gt;   File &quot;/usr/lib/python3.5/genericpath.py&quot;, line 143, in _check_arg_types
&gt;     (funcname, s.__class__.__name__)) from None
&gt; TypeError: join() argument must be str or bytes, not &apos;NoneType&apos;
&gt; 2017-06-22 11:40:46,007 - oe-selftest - INFO -
&gt; ----------------------------------------------------------------------
&gt; 2017-06-22 11:40:46,007 - oe-selftest - INFO - Ran 1 test in 22.507s
&gt; 2017-06-22 11:40:46,007 - oe-selftest - INFO - 
&gt; 2017-06-22 11:40:46,007 - oe-selftest - INFO - FAILED (errors=1)
&gt; 2017-06-22 11:40:46,007 - oe-selftest - INFO - 
&gt; 2017-06-22 11:40:46,007 - oe-selftest - INFO - Generating XML reports...
&gt; 2017-06-22 11:40:46,011 - oe-selftest - INFO - RESULTS:
&gt; 2017-06-22 11:40:46,011 - oe-selftest - INFO - RESULTS -
&gt; archiver.Archiver.test_archiver_allows_to_filter_on_recipe_name - Testcase
&gt; 1345: ERROR
&gt; 2017-06-22 11:40:46,011 - oe-selftest - INFO - SUMMARY:
&gt; 2017-06-22 11:40:46,011 - oe-selftest - INFO - oe-selftest () - Ran 1 test
&gt; in 22.626s
&gt; 2017-06-22 11:40:46,011 - oe-selftest - INFO - oe-selftest - FAIL - Required
&gt; tests failed
&gt; 
&gt; We can likely do better than this.

I can&apos;t reproduce this error, i deleted the 0x0a character with vim (:set noendofline binary) and then verified with hexdump -C.

And for me this test passes.

Anibal</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76256</commentid>
    <comment_count>2</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-08-29 17:16:48 +0000</bug_when>
    <thetext>The problem seems to be gone, even though I can&apos;t find the commit with fixed. Closing as obsolete.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>