This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new df9f700c28 tools/ci: print cmake warning message only once
df9f700c28 is described below
commit df9f700c28777cecdc698de3db6a1cc251eb316d
Author: chao an <[email protected]>
AuthorDate: Thu Jul 20 17:48:27 2023 +0800
tools/ci: print cmake warning message only once
1. print cmake warning message only once
2. Touch Dockerfile to update the ci-docker
Signed-off-by: chao an <[email protected]>
---
tools/checkpatch.sh | 16 ++++++++++++----
tools/ci/docker/linux/Dockerfile | 1 +
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 962584b86e..f51f63b2a0 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -25,6 +25,7 @@ range=0
spell=0
encoding=0
message=0
+cmake_warning_once=0
usage() {
echo "USAGE: ${0} [options] [list|-]"
@@ -87,12 +88,19 @@ check_file() {
fi
elif [ "$(is_cmake_file $@)" == "1" ]; then
if ! command -v cmake-format &> /dev/null; then
- echo -e "\ncmake-format not found, run following command to install:"
- echo " $ pip install cmake-format"
+ if [ $cmake_warning_once == 0 ]; then
+ echo -e "\ncmake-format not found, run following command to install:"
+ echo " $ pip install cmake-format"
+ cmake_warning_once=1
+ fi
fail=1
elif ! cmake-format --check $@ 2>&1; then
- echo -e "\ncmake-format check failed, run following command to update
the style:"
- echo " $ cmake-format -o $@ $@"
+ if [ $cmake_warning_once == 0 ]; then
+ echo -e "\ncmake-format check failed, run following command to update
the style:"
+ echo -e " $ cmake-format -o <src> <dst>\n"
+ cmake-format --check $@ 2>&1
+ cmake_warning_once=1
+ fi
fail=1
fi
elif ! $TOOLDIR/nxstyle $@ 2>&1; then
diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile
index d5e505e3bf..b792e696cc 100644
--- a/tools/ci/docker/linux/Dockerfile
+++ b/tools/ci/docker/linux/Dockerfile
@@ -303,6 +303,7 @@ RUN pip3 install pytest==6.2.5
RUN pip3 install pytest-json==0.4.0
RUN pip3 install pytest-ordering==0.6
RUN pip3 install pytest-repeat==0.9.1
+
# Used to generate symbol table files
RUN mkdir /tools