diff mbox series

[kvm-unit-tests,1/2] shellcheck: Fix shellcheck target with out of tree build

Message ID 20240503052510.968229-2-npiggin@gmail.com (mailing list archive)
State New, archived
Headers show
Series shellcheck: post-merge fixups | expand

Commit Message

Nicholas Piggin May 3, 2024, 5:25 a.m. UTC
Prepend source directory to script names, and include source directory
in shellcheck search path.

Fixes: ddfdcc3929aef ("Add initial shellcheck checking")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth May 3, 2024, 6:31 a.m. UTC | #1
On 03/05/2024 07.25, Nicholas Piggin wrote:
> Prepend source directory to script names, and include source directory
> in shellcheck search path.
> 
> Fixes: ddfdcc3929aef ("Add initial shellcheck checking")
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 6240d8dfa..b0f7ad08b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -143,7 +143,7 @@ cscope:
>   
>   .PHONY: shellcheck
>   shellcheck:
> -	shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh
> +	shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh
>   
>   .PHONY: tags
>   tags:

Tested-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 6240d8dfa..b0f7ad08b 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,7 @@  cscope:
 
 .PHONY: shellcheck
 shellcheck:
-	shellcheck -a run_tests.sh */run */efi/run scripts/mkstandalone.sh
+	shellcheck -P $(SRCDIR) -a $(SRCDIR)/run_tests.sh $(SRCDIR)/*/run $(SRCDIR)/*/efi/run $(SRCDIR)/scripts/mkstandalone.sh
 
 .PHONY: tags
 tags: