[PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too

Thomas Huth posted 1 patch 2 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220201085554.85733-1-thuth@redhat.com
tests/lcitool/Makefile.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too
Posted by Thomas Huth 2 years, 3 months ago
When running "make lcitool-refresh" in an out-of-tree build, it
currently fails with an error message from git like this:

 fatal: not a git repository (or any parent up to mount point /)
 Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Fix it by changing to the source directory first before updating
the submodule.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/lcitool/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/lcitool/Makefile.include b/tests/lcitool/Makefile.include
index cff7c0b814..6b215adcd1 100644
--- a/tests/lcitool/Makefile.include
+++ b/tests/lcitool/Makefile.include
@@ -13,5 +13,5 @@ lcitool:
 lcitool-help: lcitool
 
 lcitool-refresh:
-	$(call quiet-command, git submodule update --init $(SRC_PATH)/tests/lcitool/libvirt-ci)
+	$(call quiet-command, cd $(SRC_PATH) && git submodule update --init tests/lcitool/libvirt-ci)
 	$(call quiet-command, $(LCITOOL_REFRESH))
-- 
2.27.0


Re: [PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too
Posted by Daniel P. Berrangé 2 years, 3 months ago
On Tue, Feb 01, 2022 at 09:55:54AM +0100, Thomas Huth wrote:
> When running "make lcitool-refresh" in an out-of-tree build, it
> currently fails with an error message from git like this:
> 
>  fatal: not a git repository (or any parent up to mount point /)
>  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> 
> Fix it by changing to the source directory first before updating
> the submodule.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/lcitool/Makefile.include | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too
Posted by Philippe Mathieu-Daudé via 2 years, 3 months ago
On 2/1/22 09:55, Thomas Huth wrote:
> When running "make lcitool-refresh" in an out-of-tree build, it
> currently fails with an error message from git like this:
> 
>  fatal: not a git repository (or any parent up to mount point /)
>  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> 
> Fix it by changing to the source directory first before updating
> the submodule.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/lcitool/Makefile.include | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


Re: [PATCH] tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too
Posted by Alex Bennée 2 years, 3 months ago
Thomas Huth <thuth@redhat.com> writes:

> When running "make lcitool-refresh" in an out-of-tree build, it
> currently fails with an error message from git like this:
>
>  fatal: not a git repository (or any parent up to mount point /)
>  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
>
> Fix it by changing to the source directory first before updating
> the submodule.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Queued to testing/next, thanks.

-- 
Alex Bennée