From 22abcfe6ba95b7a10ebb366a9b5e7a3a0b663f8b Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 19 Apr 2024 12:05:27 +0000 Subject: [PATCH] Backport #62761 to 24.3: Fix shellcheck style checking and issues --- docker/test/stateful/run.sh | 2 +- docker/test/stress/run.sh | 2 +- utils/check-style/check_shell.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/test/stateful/run.sh b/docker/test/stateful/run.sh index 98da5988ad5..6e19e57ed53 100755 --- a/docker/test/stateful/run.sh +++ b/docker/test/stateful/run.sh @@ -25,7 +25,7 @@ azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log & config_logs_export_cluster /etc/clickhouse-server/config.d/system_logs_export.yaml cache_policy="" -if [ $(( $(date +%-d) % 2 )) -eq 1 ]; then +if [ $((RANDOM % 2)) -eq 1 ]; then cache_policy="SLRU" else cache_policy="LRU" diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh index ea7e3aece1d..59edc8d5170 100644 --- a/docker/test/stress/run.sh +++ b/docker/test/stress/run.sh @@ -72,7 +72,7 @@ mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/c # Randomize cache policies. cache_policy="" -if [ $(( $(date +%-d) % 2 )) -eq 1 ]; then +if [ $((RANDOM % 2)) -eq 1 ]; then cache_policy="SLRU" else cache_policy="LRU" diff --git a/utils/check-style/check_shell.sh b/utils/check-style/check_shell.sh index 94f06220f88..095aeed3d3d 100755 --- a/utils/check-style/check_shell.sh +++ b/utils/check-style/check_shell.sh @@ -5,7 +5,7 @@ cd /ClickHouse/utils/check-style || echo -e "failure\tRepo not found" > /test_ou start_total=$(date +%s) start=$(date +%s) -./shellcheck-run.sh |& tee /test_output/shellcheck.txt +./shellcheck-run.sh |& tee /test_output/shellcheck_output.txt runtime=$(($(date +%s)-start)) echo "Check shellcheck. Done. $runtime seconds."