diff mbox series

board/qemu: add echo for errors

Message ID 20230122123645.2903470-1-cherniaev.andrei@kairo.space
State Changes Requested
Headers show
Series board/qemu: add echo for errors | expand

Commit Message

AndreiCherniaev Jan. 22, 2023, 12:36 p.m. UTC
From: AndreiCherniaev <glscene2010@gmail.com>

---
 board/qemu/post-image.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Romain Naour Feb. 7, 2023, 4:26 p.m. UTC | #1
Hello Andrei,

Le 22/01/2023 à 13:36, AndreiCherniaev a écrit :
> From: AndreiCherniaev <glscene2010@gmail.com>
> 

Your Signed-off-by is missing, so we can't apply the patch as is [1].

I'm making it as "Changes requested".

Maybe a small comment explaining why you want to change the script would be great.

[1] https://nightly.buildroot.org/manual.html#submitting-patches

> ---
>  board/qemu/post-image.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/board/qemu/post-image.sh b/board/qemu/post-image.sh
> index 88f0413496..91d5b88b03 100755
> --- a/board/qemu/post-image.sh
> +++ b/board/qemu/post-image.sh
> @@ -6,8 +6,8 @@ README_FILES="${QEMU_BOARD_DIR}/*/readme.txt"
>  START_QEMU_SCRIPT="${BINARIES_DIR}/start-qemu.sh"
>  
>  if [[ "${DEFCONFIG_NAME}" =~ ^"qemu_*" ]]; then
> -    # Not a Qemu defconfig, can't test.
> -    exit 0
> +    echo "Not a Qemu defconfig, can't test"
> +    exit 1

Initially exit 0 was intended to not fail the build for non qemu defconfig in
gitlab-ci. But board/qemu/post-image.sh in only used by qemu defconfig so even
the test doesn't seems not required anymore.

>  fi
>  
>  # Search for "# qemu_*_defconfig" tag in all readme.txt files.
> @@ -15,8 +15,8 @@ fi
>  QEMU_CMD_LINE=$(sed -r ':a; /\\$/N; s/\\\n//; s/\t/ /; ta; /# '${DEFCONFIG_NAME}'$/!d; s/#.*//' ${README_FILES})
>  
>  if [ -z "${QEMU_CMD_LINE}" ]; then
> -    # No Qemu cmd line found, can't test.
> -    exit 0
> +    echo "No Qemu cmd line found, can't test"
> +    exit 1
>  fi

IIRC, some qemu defconfig was not gitlab-ready so exit 0 was here to not fail
the gitlab-ci job if no qemu command line was provided. Only a build test is
done in this case.

Best regards,
Romain


>  
>  # Remove output/images path since the script will be in
diff mbox series

Patch

diff --git a/board/qemu/post-image.sh b/board/qemu/post-image.sh
index 88f0413496..91d5b88b03 100755
--- a/board/qemu/post-image.sh
+++ b/board/qemu/post-image.sh
@@ -6,8 +6,8 @@  README_FILES="${QEMU_BOARD_DIR}/*/readme.txt"
 START_QEMU_SCRIPT="${BINARIES_DIR}/start-qemu.sh"
 
 if [[ "${DEFCONFIG_NAME}" =~ ^"qemu_*" ]]; then
-    # Not a Qemu defconfig, can't test.
-    exit 0
+    echo "Not a Qemu defconfig, can't test"
+    exit 1
 fi
 
 # Search for "# qemu_*_defconfig" tag in all readme.txt files.
@@ -15,8 +15,8 @@  fi
 QEMU_CMD_LINE=$(sed -r ':a; /\\$/N; s/\\\n//; s/\t/ /; ta; /# '${DEFCONFIG_NAME}'$/!d; s/#.*//' ${README_FILES})
 
 if [ -z "${QEMU_CMD_LINE}" ]; then
-    # No Qemu cmd line found, can't test.
-    exit 0
+    echo "No Qemu cmd line found, can't test"
+    exit 1
 fi
 
 # Remove output/images path since the script will be in