From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [PATCH 05/24] testsdkext/devtool: initialize the test component's git repo
Date: Tue, 5 May 2020 15:01:14 +0200 [thread overview]
Message-ID: <20200505130133.24930-5-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200505130133.24930-1-alex.kanavin@gmail.com>
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.kanavin@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
next prev parent reply other threads:[~2020-05-05 13:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 13:01 [PATCH 01/24] libinput: add ptest Alexander Kanavin
2020-05-05 13:01 ` [PATCH 02/24] libinput: update 1.15.2 -> 1.15.5 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 03/24] avahi: merge avahi-ui into the main recipe Alexander Kanavin
2020-05-05 13:01 ` [PATCH 04/24] avahi: update to 0.8 Alexander Kanavin
2020-05-05 13:01 ` Alexander Kanavin [this message]
2020-05-08 17:20 ` [OE-core] [PATCH 05/24] testsdkext/devtool: initialize the test component's git repo Steve Sakoman
2020-05-08 17:22 ` Steve Sakoman
2020-05-08 19:14 ` Joshua Watt
2020-05-08 20:11 ` Alexander Kanavin
2020-05-05 13:01 ` [PATCH 06/24] git: update to 2.26.2 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 07/24] libcap: update to 2.33 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 08/24] libhandy: add a recipe from meta-oe Alexander Kanavin
2020-05-05 13:01 ` [PATCH 09/24] libdazzle: update to 3.36.0 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 10/24] epiphany: update to 3.36.1 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 11/24] patchelf: switch to git Alexander Kanavin
2020-05-05 13:01 ` [PATCH 12/24] powertop: switch to Arjan's git Alexander Kanavin
2020-05-05 13:01 ` [PATCH 13/24] meson: fix upstream version check Alexander Kanavin
2020-05-05 13:01 ` [PATCH 14/24] rpcsvc-proto: update to 1.4.1 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 15/24] vulkan-headers: upgrade 1.1.126.0 -> 1.2.135.0 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 16/24] vulkan-loader: " Alexander Kanavin
2020-05-05 13:01 ` [PATCH 17/24] vulkan-tools: " Alexander Kanavin
2020-05-05 13:01 ` [PATCH 18/24] vulkan-demos: upgrade to latest revision Alexander Kanavin
2020-05-05 13:01 ` [PATCH 19/24] e2fsprogs: update to 1.45.6 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 20/24] build-compare: update to latest revision Alexander Kanavin
2020-05-05 13:01 ` [PATCH 21/24] ovmf: update to 202002 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 22/24] cdrtools-native: fix upstream version check Alexander Kanavin
2020-05-05 13:01 ` [PATCH 23/24] testresults.json: add duration of the tests as well Alexander Kanavin
2020-05-05 13:01 ` [PATCH 24/24] re2c: correct upstream location Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200505130133.24930-5-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox