Message ID | 20240915234131.61962-2-abdul.rahim@myyahoo.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kselftest/alsa: add silent flag to reduce noise | expand |
On Mon, Sep 16, 2024 at 05:11:30AM GMT, Abdul Rahim wrote: > When ALSA is not installed on the users system, the error: > > "Package alsa was not found in the pkg-config search path. > Perhaps you should add the directory containing `alsa.pc' > to the PKG_CONFIG_PATH environment variable > Package 'alsa', required by 'virtual:world', not found" these errors are being printed by `pkg-config` and the last line is irrelevant in our context > > is printed 3 times, which generates unnecessary noise. > Hence, Remove unnecessary noise using `--silence-errors` on LDLIBS > assignment, so the message is printed only once. or should we return error if user does'nt have alsa and move to the next test? > > Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com> > --- > tools/testing/selftests/alsa/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile > index 25be68025290..cd022fc869fb 100644 > --- a/tools/testing/selftests/alsa/Makefile > +++ b/tools/testing/selftests/alsa/Makefile > @@ -2,7 +2,7 @@ > # > > CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES) > -LDLIBS += $(shell pkg-config --libs alsa) > +LDLIBS += $(shell pkg-config --silence-errors --libs alsa) > ifeq ($(LDLIBS),) > LDLIBS += -lasound > endif > -- > 2.46.0 >
diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile index 25be68025290..cd022fc869fb 100644 --- a/tools/testing/selftests/alsa/Makefile +++ b/tools/testing/selftests/alsa/Makefile @@ -2,7 +2,7 @@ # CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES) -LDLIBS += $(shell pkg-config --libs alsa) +LDLIBS += $(shell pkg-config --silence-errors --libs alsa) ifeq ($(LDLIBS),) LDLIBS += -lasound endif
When ALSA is not installed on the users system, the error: "Package alsa was not found in the pkg-config search path. Perhaps you should add the directory containing `alsa.pc' to the PKG_CONFIG_PATH environment variable Package 'alsa', required by 'virtual:world', not found" is printed 3 times, which generates unnecessary noise. Hence, Remove unnecessary noise using `--silence-errors` on LDLIBS assignment, so the message is printed only once. Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com> --- tools/testing/selftests/alsa/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)