<?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>12389</bug_id>
          
          <creation_ts>2017-11-29 21:04:07 +0000</creation_ts>
          <short_desc>oe-selftest devtool tests fails when repository comes from a tarball</short_desc>
          <delta_ts>2025-02-20 16:42:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Runtime 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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Thomas Roos">thomas</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>rebecca.swee.fun.chang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>thomas</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>78412</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-11-29 21:04:07 +0000</bug_when>
    <thetext>some of devtool selftests (those defined on meta/lib/oeqa/selftest/cases/devtool.py) fail when poky repository comes from a tarball (not git). According to the traceback/log, devtools tests expects the source code to be (git)tracked but investigation is needed.

steps to execute:

$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/poky-rocko-18.0.0.tar.bz2
$ tar xvf poky-rocko-18.0.0.tar.bz2
$ cd poky-rocko-18.0.0
$ source oe-init-build-env
$ oe-selftest -r devtool
..
..

2017-11-29 13:25:42,694 - oe-selftest - INFO - ======================================================================
2017-11-29 13:25:42,694 - oe-selftest - INFO - FAIL: test_devtool_update_recipe_local_files_subdir (devtool.DevtoolTests)
2017-11-29 13:25:42,694 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-11-29 13:25:42,694 - oe-selftest - INFO - Traceback (most recent call last):
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/core/decorator/__init__.py&quot;, line 32, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/selftest/cases/devtool.py&quot;, line 1099, in test_devtool_update_recipe_local_files_subdir
    self._check_repo_status(os.path.dirname(recipefile), expected_status)
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/selftest/cases/devtool.py&quot;, line 158, in _check_repo_status
    cwd=repo_dir)
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/utils/commands.py&quot;, line 191, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, exc_output))
AssertionError: Command &apos;git status . --porcelain&apos; returned non-zero exit status 128:
fatal: Not a git repository (or any of the parent directories): .git

2017-11-29 13:25:42,694 - oe-selftest - INFO - ======================================================================
2017-11-29 13:25:42,694 - oe-selftest - INFO - FAIL: test_devtool_update_recipe_local_patch_gz (devtool.DevtoolTests)
2017-11-29 13:25:42,694 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-11-29 13:25:42,694 - oe-selftest - INFO - Traceback (most recent call last):
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/core/decorator/__init__.py&quot;, line 32, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/selftest/cases/devtool.py&quot;, line 1068, in test_devtool_update_recipe_local_patch_gz
    self._check_repo_status(os.path.dirname(recipefile), expected_status)
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/selftest/cases/devtool.py&quot;, line 158, in _check_repo_status
    cwd=repo_dir)
  File &quot;/home/lsandov1/tmp/poky-rocko-18.0.0/meta/lib/oeqa/utils/commands.py&quot;, line 191, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, exc_output))
AssertionError: Command &apos;git status . --porcelain&apos; returned non-zero exit status 128:
fatal: Not a git repository (or any of the parent directories): .git


2017-11-29 13:25:42,694 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-11-29 13:25:42,695 - oe-selftest - INFO - Ran 38 tests in 7190.118s
2017-11-29 13:25:42,695 - oe-selftest - INFO - FAILED
2017-11-29 13:25:42,695 - oe-selftest - INFO -  (failures=16, skipped=1)
2017-11-29 13:25:42,695 - oe-selftest - INFO - RESULTS:
2017-11-29 13:25:42,695 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_create_workspace - Testcase 1158: PASSED
2017-11-29 13:25:42,695 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add - Testcase 1159: PASSED
2017-11-29 13:25:42,695 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add_fetch - Testcase 1160: PASSED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add_fetch_git - Testcase 1161: FAILED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add_fetch_simple - Testcase 1391: PASSED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add_git_local - Testcase 1423: FAILED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_add_library - Testcase 1162: FAILED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_build_image - Testcase 1366: PASSED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_buildclean - Testcase 1620: PASSED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_deploy_target - Testcase 1272: SKIPPED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_extract - Testcase 1163: PASSED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_extract_virtual - Testcase 1379: PASSED
2017-11-29 13:25:42,696 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_finish_modify_origlayer - Testcase 1621: FAILED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_finish_modify_otherlayer - Testcase 1622: FAILED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_finish_upgrade_origlayer - Testcase 1623: FAILED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_finish_upgrade_otherlayer - Testcase 1624: FAILED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_layer_plugins - Testcase 1352: PASSED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_load_plugin - Testcase 1625: PASSED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_modify - Testcase 1164: PASSED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_modify_git - Testcase 1165: PASSED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_modify_invalid - Testcase 1166: PASSED
2017-11-29 13:25:42,697 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_modify_localfiles - Testcase 1167: PASSED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_modify_native - Testcase 1365: PASSED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_modify_virtual - Testcase 1378: PASSED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_rename - Testcase 1626: PASSED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_reset_all - Testcase 1168: PASSED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe - Testcase 1169: FAILED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_append - Testcase 1170: FAILED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_append_git - Testcase 1171: FAILED
2017-11-29 13:25:42,698 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_git - Testcase 1172: FAILED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_local_files - Testcase 1370: FAILED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_local_files_2 - Testcase 1371: FAILED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_local_files_3 - Testcase 1627: FAILED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_local_files_subdir - Testcase 1628: FAILED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_update_recipe_local_patch_gz - Testcase 1629: FAILED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_upgrade - Testcase 1367: PASSED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_upgrade_git - Testcase 1433: PASSED
2017-11-29 13:25:42,699 - oe-selftest - INFO - RESULTS - devtool.DevtoolTests.test_devtool_virtual_kernel_modify - Testcase 1577: PASSED
2017-11-29 13:25:42,699 - oe-selftest - INFO - SUMMARY:
2017-11-29 13:25:42,699 - oe-selftest - INFO - oe-selftest () - Ran 38 tests in 7190.123s
2017-11-29 13:25:42,700 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (skipped=1)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78413</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-11-29 21:05:43 +0000</bug_when>
    <thetext>In general, the whole suite must be exercised (oe-selftest -a) based on release tarball and see if other areas are affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84272</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-06-20 11:21:28 +0000</bug_when>
    <thetext>We should probably just skip the tests in this case if the tree isn&apos;t a git repo (or just error out upfront and refuse to run the tests at all if too many are affected).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95409</commentid>
    <comment_count>3</comment_count>
    <who name="Thomas Roos">thomas</who>
    <bug_when>2023-04-21 11:33:33 +0000</bug_when>
    <thetext>What about making it a git before starting tests? -&gt; git init?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95530</commentid>
    <comment_count>4</comment_count>
    <who name="Thomas Roos">thomas</who>
    <bug_when>2023-05-12 13:53:45 +0000</bug_when>
    <thetext>Is there any possibility to skip a whole class of tests?
At test level skipping would be possible by something like this:

        try:
            runCmd(&quot;git rev-parse --is-inside-work-tree&quot;)
        except:
            self.skipTest(&quot;Devtool tests require folder to be a git repo&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95531</commentid>
    <comment_count>5</comment_count>
    <who name="Thomas Roos">thomas</who>
    <bug_when>2023-05-12 13:56:55 +0000</bug_when>
    <thetext>In general those are the numbers for oe-selftest -a
2023-04-22 01:42:10,561 - oe-selftest - INFO - oe-selftest () - Ran 530 tests in 49170.163s
2023-04-22 01:42:10,561 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed (successes=472, skipped=10, failures=19, errors=33)

-&gt; so we could skip to whole devtool class and then also skip others.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95574</commentid>
    <comment_count>6</comment_count>
    <who name="Thomas Roos">thomas</who>
    <bug_when>2023-05-19 12:12:07 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/181548</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95588</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2023-05-25 09:37:23 +0000</bug_when>
    <thetext>Thanks for sorting the patch out for this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96848</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:29 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101188</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-20 16:42:02 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?id=95a5bc130dc51ea9de95c64dbf0e9c7892415d50

Thanks Thomas.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>