OSDN Git Service

kselftests: Enable the echo command to print newlines in Makefile
authorGautam <gautammenghani201@gmail.com>
Sat, 25 Jun 2022 13:54:55 +0000 (19:24 +0530)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 27 Jun 2022 20:14:01 +0000 (14:14 -0600)
In the install section of the main Makefile of kselftests, the echo
command is used with -n flag, which disables the printing of new line
due to which the output contains "\n" chars as follows:

  Emit Tests for alsa\nSkipping non-existent dir: arm64
  Emit Tests for breakpoints\nEmit Tests for capabilities\n

This patch fixes the above bug by using the -e flag.

Signed-off-by: Gautam <gautammenghani201@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/Makefile

index de11992..52e3143 100644 (file)
@@ -253,7 +253,7 @@ ifdef INSTALL_PATH
        for TARGET in $(TARGETS); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                [ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
-               echo -n "Emit Tests for $$TARGET\n"; \
+               echo -ne "Emit Tests for $$TARGET\n"; \
                $(MAKE) -s --no-print-directory OUTPUT=$$BUILD_TARGET COLLECTION=$$TARGET \
                        -C $$TARGET emit_tests >> $(TEST_LIST); \
        done;