This is an automated email from the ASF dual-hosted git repository.

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 049c1fd6846 Use double brackets for Bash conditions (#40311)
049c1fd6846 is described below

commit 049c1fd6846ab01998f3dd4c335ff9e4dc416ab0
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Oct 21 19:00:17 2026 +0800

    Use double brackets for Bash conditions (#40311)
---
 .../scripts/e2e-sql/generate-e2e-sql-matrix.sh     | 110 ++++++++++-----------
 .../scripts/e2e-sql/generate-remaining-matrix.sh   |   4 +-
 .../e2e-sql/test-generate-e2e-sql-matrix.sh        |  12 +--
 .../code-coverage-merge.sh                         |   4 +-
 4 files changed, 65 insertions(+), 65 deletions(-)

diff --git 
a/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh 
b/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh
index 762e31962c8..367477dc880 100755
--- a/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh
+++ b/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh
@@ -181,7 +181,7 @@ build_pairwise_matrix() {
     job_pair_5[$idx]="$pair5"
     job_pair_6[$idx]="$pair6"
   done < "$job_file"
-  if [ "${#jobs[@]}" -eq 0 ]; then
+  if [[ "${#jobs[@]}" -eq 0 ]]; then
     rm -f "$job_file" "$selected_file"
     echo '{"include":[]}'
     return
@@ -189,7 +189,7 @@ build_pairwise_matrix() {
   add_selected_index() {
     local idx="$1"
     local _pair
-    [ "${selected_flags[$idx]}" -eq 1 ] && return
+    [[ "${selected_flags[$idx]}" -eq 1 ]] && return
     selected_flags[$idx]=1
     selected_indexes+=("$idx")
     for _pair in "${job_pair_1[$idx]}" "${job_pair_2[$idx]}" 
"${job_pair_3[$idx]}" "${job_pair_4[$idx]}" "${job_pair_5[$idx]}" 
"${job_pair_6[$idx]}"; do
@@ -211,7 +211,7 @@ build_pairwise_matrix() {
     done
   }
   for idx in "${!jobs[@]}"; do
-    if [ "${job_has_additional[$idx]}" = "true" ]; then
+    if [[ "${job_has_additional[$idx]}" = "true" ]]; then
       add_selected_index "$idx"
     fi
   done
@@ -219,32 +219,32 @@ build_pairwise_matrix() {
     best_idx=-1
     best_score=-1
     for idx in "${!jobs[@]}"; do
-      [ "${job_scenarios[$idx]}" = "$required_scenario" ] || continue
+      [[ "${job_scenarios[$idx]}" = "$required_scenario" ]] || continue
       candidate_score="${job_scores[$idx]}"
-      if [ "$best_idx" -lt 0 ] || [ "$candidate_score" -gt "$best_score" ] || 
{ [ "$candidate_score" -eq "$best_score" ] && [ "$idx" -lt "$best_idx" ]; }; 
then
+      if [[ "$best_idx" -lt 0 ]] || [[ "$candidate_score" -gt "$best_score" ]] 
|| { [[ "$candidate_score" -eq "$best_score" ]] && [[ "$idx" -lt "$best_idx" 
]]; }; then
         best_idx="$idx"
         best_score="$candidate_score"
       fi
     done
-    [ "$best_idx" -lt 0 ] || add_selected_index "$best_idx"
+    [[ "$best_idx" -lt 0 ]] || add_selected_index "$best_idx"
   done < <(echo "$scenario_list_json" | jq -r '.[]')
   while true; do
     pick_idx=-1
     pick_new=0
     pick_score=-1
     for idx in "${!jobs[@]}"; do
-      [ "${selected_flags[$idx]}" -eq 1 ] && continue
+      [[ "${selected_flags[$idx]}" -eq 1 ]] && continue
       count_new_pairs "$idx"
       candidate_new="$new_pairs"
-      [ "$candidate_new" -gt 0 ] || continue
+      [[ "$candidate_new" -gt 0 ]] || continue
       candidate_score="${job_scores[$idx]}"
-      if [ "$pick_idx" -lt 0 ] || [ "$candidate_new" -gt "$pick_new" ] || { [ 
"$candidate_new" -eq "$pick_new" ] && [ "$candidate_score" -gt "$pick_score" ]; 
} || { [ "$candidate_new" -eq "$pick_new" ] && [ "$candidate_score" -eq 
"$pick_score" ] && [ "$idx" -lt "$pick_idx" ]; }; then
+      if [[ "$pick_idx" -lt 0 ]] || [[ "$candidate_new" -gt "$pick_new" ]] || 
{ [[ "$candidate_new" -eq "$pick_new" ]] && [[ "$candidate_score" -gt 
"$pick_score" ]]; } || { [[ "$candidate_new" -eq "$pick_new" ]] && [[ 
"$candidate_score" -eq "$pick_score" ]] && [[ "$idx" -lt "$pick_idx" ]]; }; then
         pick_idx="$idx"
         pick_new="$candidate_new"
         pick_score="$candidate_score"
       fi
     done
-    [ "$pick_idx" -lt 0 ] && break
+    [[ "$pick_idx" -lt 0 ]] && break
     add_selected_index "$pick_idx"
   done
   for idx in "${selected_indexes[@]}"; do
@@ -264,13 +264,13 @@ log_counts() {
 }
 
 any_base_change=false
-if [ "$core_infra" = "true" ] || [ "$test_framework" = "true" ] || [ 
"$pom_changes" = "true" ]; then
+if [[ "$core_infra" = "true" ]] || [[ "$test_framework" = "true" ]] || [[ 
"$pom_changes" = "true" ]]; then
   any_base_change=true
   echo "::notice::Base filters triggered (core_infra=$core_infra, 
test_framework=$test_framework, pom_changes=$pom_changes)"
 fi
 
 manual_dispatch=false
-if [ "${GITHUB_EVENT_NAME:-}" = "workflow_dispatch" ]; then
+if [[ "${GITHUB_EVENT_NAME:-}" = "workflow_dispatch" ]]; then
   manual_dispatch=true
   echo "::notice::workflow_dispatch detected"
 fi
@@ -287,24 +287,24 @@ esac
 
 # Check whether any relevant dimension changed at all
 any_relevant_change=false
-if [ "$feature_sharding" = "true" ] || [ "$feature_encrypt" = "true" ] || \
-   [ "$feature_readwrite_splitting" = "true" ] || [ "$feature_shadow" = "true" 
] || \
-   [ "$feature_mask" = "true" ] || [ "$feature_broadcast" = "true" ] || \
-   [ "$feature_distsql" = "true" ] || [ "$feature_sql_federation" = "true" ] 
|| \
-   [ "$mode_standalone" = "true" ] || [ "$mode_cluster" = "true" ] || [ 
"$mode_core" = "true" ] || \
-   [ "$database_mysql" = "true" ] || [ "$database_postgresql" = "true" ] || \
-   [ "$adapter_proxy" = "true" ] || [ "$adapter_jdbc" = "true" ] || \
-   [ "$any_base_change" = "true" ]; then
+if [[ "$feature_sharding" = "true" ]] || [[ "$feature_encrypt" = "true" ]] || \
+   [[ "$feature_readwrite_splitting" = "true" ]] || [[ "$feature_shadow" = 
"true" ]] || \
+   [[ "$feature_mask" = "true" ]] || [[ "$feature_broadcast" = "true" ]] || \
+   [[ "$feature_distsql" = "true" ]] || [[ "$feature_sql_federation" = "true" 
]] || \
+   [[ "$mode_standalone" = "true" ]] || [[ "$mode_cluster" = "true" ]] || [[ 
"$mode_core" = "true" ]] || \
+   [[ "$database_mysql" = "true" ]] || [[ "$database_postgresql" = "true" ]] 
|| \
+   [[ "$adapter_proxy" = "true" ]] || [[ "$adapter_jdbc" = "true" ]] || \
+   [[ "$any_base_change" = "true" ]]; then
   any_relevant_change=true
   echo "::notice::At least one relevant filter is true, will generate jobs 
based on dimensions and scenarios"
 fi
 
-if [ "$manual_dispatch" = "true" ]; then
+if [[ "$manual_dispatch" = "true" ]]; then
   any_relevant_change=true
   echo "::notice::workflow_dispatch enforces relevant-change path"
 fi
 
-if [ "$any_relevant_change" = "false" ]; then
+if [[ "$any_relevant_change" = "false" ]]; then
   echo "matrix={\"include\":[]}" >> "$GITHUB_OUTPUT"
   echo "has-jobs=false" >> "$GITHUB_OUTPUT"
   echo "smoke-matrix={\"include\":[]}" >> "$GITHUB_OUTPUT"
@@ -315,36 +315,36 @@ if [ "$any_relevant_change" = "false" ]; then
 fi
 
 # Determine adapters
-if [ "$any_base_change" = "true" ]; then
+if [[ "$any_base_change" = "true" ]]; then
   adapters="$ALL_ADAPTERS"
   echo "::notice::Base change detected, including all adapters"
-elif [ "$adapter_proxy" = "true" ] && [ "$adapter_jdbc" = "false" ]; then
+elif [[ "$adapter_proxy" = "true" ]] && [[ "$adapter_jdbc" = "false" ]]; then
   adapters='["proxy"]'
-elif [ "$adapter_jdbc" = "true" ] && [ "$adapter_proxy" = "false" ]; then
+elif [[ "$adapter_jdbc" = "true" ]] && [[ "$adapter_proxy" = "false" ]]; then
   adapters='["jdbc"]'
 else
   adapters="$ALL_ADAPTERS"
 fi
 
 # Determine modes
-if [ "$any_base_change" = "true" ]; then
+if [[ "$any_base_change" = "true" ]]; then
   modes="$ALL_MODES"
   echo "::notice::Base change detected, including all modes"
-elif [ "$mode_standalone" = "true" ] && [ "$mode_cluster" = "false" ] && [ 
"$mode_core" = "false" ]; then
+elif [[ "$mode_standalone" = "true" ]] && [[ "$mode_cluster" = "false" ]] && 
[[ "$mode_core" = "false" ]]; then
   modes='["Standalone"]'
-elif [ "$mode_cluster" = "true" ] && [ "$mode_standalone" = "false" ] && [ 
"$mode_core" = "false" ]; then
+elif [[ "$mode_cluster" = "true" ]] && [[ "$mode_standalone" = "false" ]] && 
[[ "$mode_core" = "false" ]]; then
   modes='["Cluster"]'
 else
   modes="$ALL_MODES"
 fi
 
 # Determine databases
-if [ "$any_base_change" = "true" ]; then
+if [[ "$any_base_change" = "true" ]]; then
   databases="$ALL_DATABASES"
   echo "::notice::Base change detected, including all databases"
-elif [ "$database_mysql" = "true" ] && [ "$database_postgresql" = "false" ]; 
then
+elif [[ "$database_mysql" = "true" ]] && [[ "$database_postgresql" = "false" 
]]; then
   databases='["MySQL"]'
-elif [ "$database_postgresql" = "true" ] && [ "$database_mysql" = "false" ]; 
then
+elif [[ "$database_postgresql" = "true" ]] && [[ "$database_mysql" = "false" 
]]; then
   databases='["PostgreSQL"]'
 else
   databases="$ALL_DATABASES"
@@ -358,7 +358,7 @@ smoke_scenarios_set=()
 add_scenario() {
   local s="$1"
   for existing in "${scenarios_set[@]+"${scenarios_set[@]}"}"; do
-    [ "$existing" = "$s" ] && return
+    [[ "$existing" = "$s" ]] && return
   done
   scenarios_set+=("$s")
 }
@@ -366,12 +366,12 @@ add_scenario() {
 add_smoke_scenario() {
   local s="$1"
   for existing in "${smoke_scenarios_set[@]+"${smoke_scenarios_set[@]}"}"; do
-    [ "$existing" = "$s" ] && return
+    [[ "$existing" = "$s" ]] && return
   done
   smoke_scenarios_set+=("$s")
 }
 
-if [ "$feature_sharding" = "true" ]; then
+if [[ "$feature_sharding" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "db"
   add_smoke_scenario "tbl"
@@ -382,7 +382,7 @@ if [ "$feature_sharding" = "true" ]; then
   done
 fi
 
-if [ "$feature_encrypt" = "true" ]; then
+if [[ "$feature_encrypt" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "encrypt"
   for s in encrypt dbtbl_with_readwrite_splitting_and_encrypt 
sharding_and_encrypt \
@@ -392,7 +392,7 @@ if [ "$feature_encrypt" = "true" ]; then
   done
 fi
 
-if [ "$feature_readwrite_splitting" = "true" ]; then
+if [[ "$feature_readwrite_splitting" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "readwrite_splitting"
   for s in readwrite_splitting dbtbl_with_readwrite_splitting \
@@ -402,7 +402,7 @@ if [ "$feature_readwrite_splitting" = "true" ]; then
   done
 fi
 
-if [ "$feature_shadow" = "true" ]; then
+if [[ "$feature_shadow" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "shadow"
   for s in shadow encrypt_shadow readwrite_splitting_and_shadow 
sharding_and_shadow \
@@ -411,7 +411,7 @@ if [ "$feature_shadow" = "true" ]; then
   done
 fi
 
-if [ "$feature_mask" = "true" ]; then
+if [[ "$feature_mask" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "mask"
   for s in mask mask_encrypt mask_sharding mask_encrypt_sharding; do
@@ -419,32 +419,32 @@ if [ "$feature_mask" = "true" ]; then
   done
 fi
 
-if [ "$feature_distsql" = "true" ]; then
+if [[ "$feature_distsql" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "distsql_rdl"
   add_scenario "distsql_rdl"
 fi
 
-if [ "$feature_sql_federation" = "true" ]; then
+if [[ "$feature_sql_federation" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "db_tbl_sql_federation"
   add_scenario "db_tbl_sql_federation"
 fi
 
-if [ "$feature_broadcast" = "true" ]; then
+if [[ "$feature_broadcast" = "true" ]]; then
   any_feature_triggered=true
   add_smoke_scenario "empty_rules"
   add_scenario "empty_rules"
 fi
 
-if [ "$any_feature_triggered" = "true" ]; then
+if [[ "$any_feature_triggered" = "true" ]]; then
   adapters=$ALL_ADAPTERS
   modes=$ALL_MODES
   databases=$ALL_DATABASES
   echo "::notice::Feature filters triggered, including all adapters, modes, 
and databases"
 fi
 
-if [ "$manual_dispatch" = "true" ]; then
+if [[ "$manual_dispatch" = "true" ]]; then
   adapters=$ALL_ADAPTERS
   modes=$ALL_MODES
   databases=$ALL_DATABASES
@@ -452,10 +452,10 @@ if [ "$manual_dispatch" = "true" ]; then
 fi
 
 effective_target_matrix_algorithm="$requested_target_matrix_algorithm"
-if [ "$effective_target_matrix_algorithm" = "auto" ]; then
-  if [ "$manual_dispatch" = "true" ]; then
+if [[ "$effective_target_matrix_algorithm" = "auto" ]]; then
+  if [[ "$manual_dispatch" = "true" ]]; then
     effective_target_matrix_algorithm="cartesian"
-  elif [ "$any_base_change" = "true" ] || [ "$any_feature_triggered" = "true" 
]; then
+  elif [[ "$any_base_change" = "true" ]] || [[ "$any_feature_triggered" = 
"true" ]]; then
     effective_target_matrix_algorithm="pairwise"
   else
     effective_target_matrix_algorithm="cartesian"
@@ -465,8 +465,8 @@ fi
 echo "::notice::any_base_change=$any_base_change, 
any_feature_triggered=$any_feature_triggered, dimensions adapters=$adapters 
modes=$modes databases=$databases, 
target-matrix-algorithm(requested=$requested_target_matrix_algorithm,effective=$effective_target_matrix_algorithm)"
 
 # Generate smoke-matrix from default or feature-mapped smoke scenarios, and DO 
NOT add the extra passthrough job
-if [ "$any_feature_triggered" = "true" ]; then
-  if [ "${#smoke_scenarios_set[@]}" -eq 0 ]; then
+if [[ "$any_feature_triggered" = "true" ]]; then
+  if [[ "${#smoke_scenarios_set[@]}" -eq 0 ]]; then
     smoke_scenarios_json="$SMOKE_SCENARIOS"
     echo "::notice::smoke-matrix 
reason=feature-triggered-without-smoke-mapping, fallback scenarios: 
$smoke_scenarios_json"
   else
@@ -481,14 +481,14 @@ SMOKE_MATRIX=$(build_matrix "$adapters" "$modes" 
"$databases" "$smoke_scenarios_
 log_counts "smoke-matrix" "$SMOKE_MATRIX"
 
 # Build target-matrix scenarios
-if [ "$manual_dispatch" = "true" ]; then
+if [[ "$manual_dispatch" = "true" ]]; then
   target_scenarios_json="$ALL_SCENARIOS"
   echo "::notice::target-matrix reason=workflow-dispatch, use all scenarios: 
$target_scenarios_json"
-elif [ "$any_base_change" = "true" ]; then
+elif [[ "$any_base_change" = "true" ]]; then
   target_scenarios_json="$ALL_SCENARIOS"
   echo "::notice::target-matrix reason=base-change, use all scenarios: 
$target_scenarios_json"
 else
-  if [ "$any_feature_triggered" = "false" ]; then
+  if [[ "$any_feature_triggered" = "false" ]]; then
     # When no feature triggered, target-matrix is limited to smoke scenario set
     target_scenarios_json="$SMOKE_SCENARIOS"
     echo "::notice::target-matrix reason=no-feature-triggered, use smoke 
scenarios: $target_scenarios_json"
@@ -500,8 +500,8 @@ fi
 
 TARGET_MATRIX_CANDIDATE=$(build_matrix "$adapters" "$modes" "$databases" 
"$target_scenarios_json" true)
 TARGET_MATRIX_CANDIDATE_COUNT=$(echo "$TARGET_MATRIX_CANDIDATE" | jq '.include 
| length')
-if [ "$effective_target_matrix_algorithm" = "pairwise" ]; then
-  if [ "$TARGET_MATRIX_CANDIDATE_COUNT" -le 20 ]; then
+if [[ "$effective_target_matrix_algorithm" = "pairwise" ]]; then
+  if [[ "$TARGET_MATRIX_CANDIDATE_COUNT" -le 20 ]]; then
     TARGET_MATRIX="$TARGET_MATRIX_CANDIDATE"
     echo "::notice::target-matrix pairwise skipped due to small candidate set: 
candidate=$TARGET_MATRIX_CANDIDATE_COUNT"
   else
@@ -532,13 +532,13 @@ TARGET_SMOKE_OVERLAP_COUNT=$(jq -n --argjson target 
"$TARGET_MATRIX" --argjson s
 ')
 ESTIMATED_REMAINING_TESTS_JOBS=$((TARGET_JOB_COUNT - 
TARGET_SMOKE_OVERLAP_COUNT))
 TOTAL_TWO_STAGE_JOBS=$((SMOKE_JOB_COUNT + ESTIMATED_REMAINING_TESTS_JOBS))
-if [ "$TARGET_MATRIX_CANDIDATE_COUNT" -eq 0 ]; then
+if [[ "$TARGET_MATRIX_CANDIDATE_COUNT" -eq 0 ]]; then
   EFFECTIVE_REDUCTION_RATIO="0"
 else
   EFFECTIVE_REDUCTION_RATIO=$(jq -cn --argjson candidate 
"$TARGET_MATRIX_CANDIDATE_COUNT" --argjson total "$TOTAL_TWO_STAGE_JOBS" '1 - 
($total / $candidate)')
 fi
 echo "::notice::matrix-breakdown target=$TARGET_JOB_COUNT 
smoke=$SMOKE_JOB_COUNT overlap=$TARGET_SMOKE_OVERLAP_COUNT 
estimated-remaining-tests=$ESTIMATED_REMAINING_TESTS_JOBS 
total-two-stage=$TOTAL_TWO_STAGE_JOBS 
effective-reduction-ratio=$EFFECTIVE_REDUCTION_RATIO"
-if [ "$TARGET_JOB_COUNT" -eq 0 ]; then
+if [[ "$TARGET_JOB_COUNT" -eq 0 ]]; then
   echo "smoke-matrix=$(echo "$SMOKE_MATRIX" | jq -c .)" >> "$GITHUB_OUTPUT"
   echo "target-matrix={\"include\":[]}" >> "$GITHUB_OUTPUT"
   echo "matrix={\"include\":[]}" >> "$GITHUB_OUTPUT"
diff --git 
a/.github/workflows/resources/scripts/e2e-sql/generate-remaining-matrix.sh 
b/.github/workflows/resources/scripts/e2e-sql/generate-remaining-matrix.sh
index a7256f0b738..d94cb27a3f0 100755
--- a/.github/workflows/resources/scripts/e2e-sql/generate-remaining-matrix.sh
+++ b/.github/workflows/resources/scripts/e2e-sql/generate-remaining-matrix.sh
@@ -29,7 +29,7 @@ SMOKE_MATRIX="$3"
 # Parse completed jobs from smoke matrix
 COMPLETED_JOBS=$(echo "$SMOKE_MATRIX" | jq -c '.include // []')
 
-if [ -z "$TARGET_MATRIX" ]; then
+if [[ -z "$TARGET_MATRIX" ]]; then
   echo "matrix={\"include\":[]}" >> "$GITHUB_OUTPUT"
   echo "has-remaining-jobs=false" >> "$GITHUB_OUTPUT"
   exit 0
@@ -55,7 +55,7 @@ REMAINING_JOBS=$(jq -cn \
 
 JOB_COUNT=$(echo "$REMAINING_JOBS" | jq 'length')
 
-if [ "$JOB_COUNT" -eq 0 ]; then
+if [[ "$JOB_COUNT" -eq 0 ]]; then
   echo "matrix={\"include\":[]}" >> "$GITHUB_OUTPUT"
   echo "has-remaining-jobs=false" >> "$GITHUB_OUTPUT"
   exit 0
diff --git 
a/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh 
b/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh
index 25a4eaff9c8..2207428e272 100644
--- 
a/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh
+++ 
b/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh
@@ -67,12 +67,12 @@ pass() {
 fail() {
   FAIL_COUNT=$((FAIL_COUNT + 1))
   echo "  FAIL: $1"
-  [ -n "${2:-}" ] && echo "        $2"
+  [[ -n "${2:-}" ]] && echo "        $2"
 }
 
 assert_eq() {
   local desc="$1" expected="$2" actual="$3"
-  if [ "$expected" = "$actual" ]; then
+  if [[ "$expected" = "$actual" ]]; then
     pass "$desc"
   else
     fail "$desc" "expected='$expected', actual='$actual'"
@@ -81,7 +81,7 @@ assert_eq() {
 
 assert_not_empty() {
   local desc="$1" actual="$2"
-  if [ -n "$actual" ]; then
+  if [[ -n "$actual" ]]; then
     pass "$desc"
   else
     fail "$desc" "expected non-empty value"
@@ -173,7 +173,7 @@ assert_all_dimensions() {
 
 assert_less_than() {
   local desc="$1" actual="$2" upper_bound="$3"
-  if [ "$actual" -lt "$upper_bound" ]; then
+  if [[ "$actual" -lt "$upper_bound" ]]; then
     pass "$desc"
   else
     fail "$desc" "actual='$actual' is not less than upper_bound='$upper_bound'"
@@ -225,7 +225,7 @@ if ! command -v jq &> /dev/null; then
   exit 1
 fi
 
-if [ ! -f "$TARGET_SCRIPT" ]; then
+if [[ ! -f "$TARGET_SCRIPT" ]]; then
   echo "ERROR: Target script not found: $TARGET_SCRIPT"
   exit 1
 fi
@@ -506,7 +506,7 @@ echo ""
 echo "============================================================"
 total=$((PASS_COUNT + FAIL_COUNT))
 echo "Results: $PASS_COUNT passed, $FAIL_COUNT failed (total $total)"
-if [ "$FAIL_COUNT" -gt 0 ]; then
+if [[ "$FAIL_COUNT" -gt 0 ]]; then
   exit 1
 fi
 echo "All tests passed!"
diff --git 
a/.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
 
b/.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
index c7569302be0..e6c99b1635b 100755
--- 
a/.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
+++ 
b/.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
@@ -30,7 +30,7 @@ echo 'Start searching for jacoco.exec files'
 execFiles=$(find $project -name 'jacoco.exec')
 
 # Check if files exist
-if [ -z "$execFiles" ]; then
+if [[ -z "$execFiles" ]]; then
   echo "Can't find jacoco.exec file in the specified directory"
   exit 1
 fi
@@ -62,7 +62,7 @@ classOutPutDir="$target/mergeClassFile"
 classFolders=$(find $project -type d -name 'classes')
 
 # Check if folders are found
-if [ -z "$classFolders" ]; then
+if [[ -z "$classFolders" ]]; then
   echo "The classes folder was not found in the given directory"
   exit 1
 fi

Reply via email to