Skip to content

Commit 2a94a08

Browse files
Abdul Rahimtiwai
authored andcommitted
selftest: alsa: check if user has alsa installed
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 <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent bf36793 commit 2a94a08

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/alsa/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# SPDX-License-Identifier: GPL-2.0
22
#
3+
ifneq ($(shell pkg-config --exists alsa && echo 0 || echo 1),0)
4+
$(error Package alsa not found, please install alsa development package or \
5+
add directory containing `alsa.pc` in PKG_CONFIG_PATH)
6+
endif
37

48
CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES)
59
LDLIBS += $(shell pkg-config --libs alsa)

0 commit comments

Comments
 (0)