diff --git a/Makefile.in b/Makefile.in index 09b0bc751..d8108fc57 100644 --- a/Makefile.in +++ b/Makefile.in @@ -460,6 +460,20 @@ analyzer-include: -rm -rf examples/*/obj* scan-build $(MAKE) -k examples +# Bash/sh files +BASH_FILES = \ + ci/ci-install.bash \ + ci/ci-pages-notify.bash \ + ci/ci-pages.bash \ + ci/ci-script.bash \ + ci/docker/run/hooks/post_push \ + ci/docker/run/verilator-docker \ + ci/docker/run/verilator-wrap.sh \ + nodist/fuzzer/all \ + nodist/fuzzer/run \ + nodist/fuzzer/setup_root \ + nodist/fuzzer/setup_user \ + # CMake files CMAKE_FILES = \ CMakeLists.txt \ @@ -527,6 +541,13 @@ PY_TEST_FILES = test_regress/t/*.py format: $(MAKE) -j 5 format-c format-cmake format-exec format-py +BEAUTYSH = beautysh +BEAUTYSH_FLAGS = --indent-size 2 + +format-bash: + $(BEAUTYSH) --version + $(BEAUTYSH) $(BEAUTYSH_FLAGS) $(BASH_FILES) + CLANGFORMAT = clang-format-18 CLANGFORMAT_FLAGS = -i CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h diff --git a/ci/ci-script.bash b/ci/ci-script.bash index 59966d8eb..9c24bb52e 100755 --- a/ci/ci-script.bash +++ b/ci/ci-script.bash @@ -94,18 +94,18 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then TEST_REGRESS=test_regress if [ "$CI_RELOC" == 1 ]; then - # Testing that the installation is relocatable. - "$MAKE" install - mkdir -p "$RELOC_DIR" - mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install" - export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator" - TEST_REGRESS="$RELOC_DIR/test_regress" - mv test_regress "$TEST_REGRESS" - NODIST="$RELOC_DIR/nodist" - mv nodist "$NODIST" - # Feeling brave? - find . -delete - ls -la . + # Testing that the installation is relocatable. + "$MAKE" install + mkdir -p "$RELOC_DIR" + mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install" + export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator" + TEST_REGRESS="$RELOC_DIR/test_regress" + mv test_regress "$TEST_REGRESS" + NODIST="$RELOC_DIR/nodist" + mv nodist "$NODIST" + # Feeling brave? + find . -delete + ls -la . fi # Run the specified test diff --git a/ci/docker/run/hooks/post_push b/ci/docker/run/hooks/post_push index 256e85008..6da467d3f 100755 --- a/ci/docker/run/hooks/post_push +++ b/ci/docker/run/hooks/post_push @@ -8,6 +8,6 @@ # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 if [ "$SOURCE_BRANCH"="stable" ]; then - docker tag $IMAGE_NAME $DOCKER_REPO:latest - docker push $DOCKER_REPO:latest + docker tag $IMAGE_NAME $DOCKER_REPO:latest + docker push $DOCKER_REPO:latest fi diff --git a/ci/docker/run/verilator-wrap.sh b/ci/docker/run/verilator-wrap.sh index 80d839b5b..1a5aa6211 100755 --- a/ci/docker/run/verilator-wrap.sh +++ b/ci/docker/run/verilator-wrap.sh @@ -11,21 +11,21 @@ perl /usr/local/bin/verilator "$@" status=$? if [ $status -ne 0 ]; then - exit $status + exit $status fi # Check if user set an obj_dir obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+') if [ "$obj_dir" == "" ]; then - obj_dir="obj_dir" + obj_dir="obj_dir" fi # If the run was successful: Copy required files to allow build without this container if [ -e ${obj_dir} ]; then - # Copy files required for the build - mkdir -p ${obj_dir}/vlt - cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt - cp -r /usr/local/share/verilator/include ${obj_dir}/vlt - # Point Makefile to that folder - sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk + # Copy files required for the build + mkdir -p ${obj_dir}/vlt + cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt + cp -r /usr/local/share/verilator/include ${obj_dir}/vlt + # Point Makefile to that folder + sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk fi