Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Abdul Rahim <abdul.rahim@myyahoo.com>,
	perex@perex.cz, tiwai@suse.com, broonie@kernel.org,
	shuah@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftest: alsa: check if user has alsa installed
Date: Mon, 23 Sep 2024 09:59:06 -0600	[thread overview]
Message-ID: <a4a6c672-ddcb-4f8a-ab5d-84de237129b5@linuxfoundation.org> (raw)
In-Reply-To: <20240922225824.18918-1-abdul.rahim@myyahoo.com>

On 9/22/24 16:58, Abdul Rahim wrote:
> Currently, if alsa development package is not installed on the user's
> system then the make command would print a `pagefull` of errors. In
> particular one error message is repeated 3 times. This error is returned
> by `pkg-config` and since it is not being handeled appropriately,
> repeated calls to `pkg-config` prints the same message again.
> 
> This patch adds check for alsa package installation. If alsa is not
> installed, a short and consize error is returned. Also, it does not
> affect the compilation of other tests.
> 
> Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com>
> ---
> 

[snip]

> ```
> 
>   tools/testing/selftests/alsa/Makefile | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
> index 25be68025290..944279160fed 100644
> --- a/tools/testing/selftests/alsa/Makefile
> +++ b/tools/testing/selftests/alsa/Makefile
> @@ -1,5 +1,9 @@
>   # SPDX-License-Identifier: GPL-2.0
>   #
> +ifneq ($(shell pkg-config --exists alsa && echo 0 || echo 1),0)
> +$(error Package alsa not found, please install alsa development package or \
> +	add directory containing `alsa.pc` in PKG_CONFIG_PATH)
> +endif
>   
>   CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES)
>   LDLIBS += $(shell pkg-config --libs alsa)


Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

  reply	other threads:[~2024-09-23 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240922225824.18918-1-abdul.rahim.ref@myyahoo.com>
2024-09-22 22:58 ` [PATCH] selftest: alsa: check if user has alsa installed Abdul Rahim
2024-09-23 15:59   ` Shuah Khan [this message]
2024-09-30  7:48   ` Takashi Iwai

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=a4a6c672-ddcb-4f8a-ab5d-84de237129b5@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=abdul.rahim@myyahoo.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shuah@kernel.org \
    --cc=tiwai@suse.com \
    /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