Is this patch suitable for dunfell?

Thanks,

Steve

On Tue, May 5, 2020 at 3:02 AM Alexander Kanavin <alex.kana...@gmail.com> wrote:
>
> Devtool is relying on externalsrc class, which, in order to determine
> if a rebuild is needed, relies on git to checksum files (if the
> component tree is a git repo), or sets a flag to always rebuild if
> the component tree is not a git repo.
>
> This is problematic in testsdkext scenario, where the test component
> is inside a build directory, which itself is inside the poky repo
> checkout, and listed in .gitignore. What happens is that git walks
> up the tree and uses the index of the poky repo. This works okay
> with older versions of git, but git 2.26 complains that we're inside
> a directory that is ignored, and returns an error.
>
> To fix the issue, the git repository is initialized directly in the
> component directory, just prior to running the tests.
>
> Signed-off-by: Alexander Kanavin <alex.kana...@gmail.com>
> ---
>  meta/lib/oeqa/sdkext/cases/devtool.py | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py 
> b/meta/lib/oeqa/sdkext/cases/devtool.py
> index 8e92bf8064..a5c6a76e02 100644
> --- a/meta/lib/oeqa/sdkext/cases/devtool.py
> +++ b/meta/lib/oeqa/sdkext/cases/devtool.py
> @@ -20,10 +20,16 @@ class DevtoolTest(OESDKExtTestCase):
>          myapp_src = os.path.join(cls.tc.esdk_files_dir, "myapp")
>          cls.myapp_dst = os.path.join(cls.tc.sdk_dir, "myapp")
>          shutil.copytree(myapp_src, cls.myapp_dst)
> +        subprocess.check_output(['git', 'init', '.'], cwd=cls.myapp_dst)
> +        subprocess.check_output(['git', 'add', '.'], cwd=cls.myapp_dst)
> +        subprocess.check_output(['git', 'commit', '-m', "'test commit'"], 
> cwd=cls.myapp_dst)
>
>          myapp_cmake_src = os.path.join(cls.tc.esdk_files_dir, "myapp_cmake")
>          cls.myapp_cmake_dst = os.path.join(cls.tc.sdk_dir, "myapp_cmake")
>          shutil.copytree(myapp_cmake_src, cls.myapp_cmake_dst)
> +        subprocess.check_output(['git', 'init', '.'], 
> cwd=cls.myapp_cmake_dst)
> +        subprocess.check_output(['git', 'add', '.'], cwd=cls.myapp_cmake_dst)
> +        subprocess.check_output(['git', 'commit', '-m', "'test commit'"], 
> cwd=cls.myapp_cmake_dst)
>
>      @classmethod
>      def tearDownClass(cls):
> --
> 2.26.1
>
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138060): 
https://lists.openembedded.org/g/openembedded-core/message/138060
Mute This Topic: https://lists.openembedded.org/mt/73997011/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to