From 7b1a278b61947adfde6f5d865a2f02f4e051d180 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Thu, 5 Feb 2026 09:52:28 +0000 Subject: [PATCH 1/7] Added git module update change --- cov_docker_script/common_build_utils.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cov_docker_script/common_build_utils.sh b/cov_docker_script/common_build_utils.sh index 4f3e732..25be300 100755 --- a/cov_docker_script/common_build_utils.sh +++ b/cov_docker_script/common_build_utils.sh @@ -55,6 +55,9 @@ clone_repo() { return 1 fi ok "$name cloned successfully" + + git submodule update --init --recursive --remote + ok "$name Doing git submodule update" return 0 } From 1e4d6e5d6e8d747a07c348f6e0c088e3ab8e0031 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Thu, 5 Feb 2026 10:46:02 +0000 Subject: [PATCH 2/7] Updated git submodule cmd --- cov_docker_script/common_build_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cov_docker_script/common_build_utils.sh b/cov_docker_script/common_build_utils.sh index 25be300..f401231 100755 --- a/cov_docker_script/common_build_utils.sh +++ b/cov_docker_script/common_build_utils.sh @@ -56,7 +56,7 @@ clone_repo() { fi ok "$name cloned successfully" - git submodule update --init --recursive --remote + git -C "$dest" submodule update --init --recursive --remote ok "$name Doing git submodule update" return 0 } From a6008d7a3f58fecf092b82c4cc35ef1828da065a Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:08:05 +0000 Subject: [PATCH 3/7] Updated setup_dependencies and build_native --- cov_docker_script/build_native.sh | 4 +++- cov_docker_script/setup_dependencies.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cov_docker_script/build_native.sh b/cov_docker_script/build_native.sh index 07177d5..ef5440e 100755 --- a/cov_docker_script/build_native.sh +++ b/cov_docker_script/build_native.sh @@ -8,7 +8,9 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CONFIG_FILE="${1:-$SCRIPT_DIR/component_config.json}" -COMPONENT_DIR="${2:-$(cd "$SCRIPT_DIR/.." && pwd)}" +COMPONENT_DIR="${2:-$(cd "$SCRIPT_DIR/../.." && pwd)}" + +echo "COMPONENT_DIR is set to: $COMPONENT_DIR" # Source common utilities source "$SCRIPT_DIR/common_build_utils.sh" diff --git a/cov_docker_script/setup_dependencies.sh b/cov_docker_script/setup_dependencies.sh index a4835f8..1bc1e89 100755 --- a/cov_docker_script/setup_dependencies.sh +++ b/cov_docker_script/setup_dependencies.sh @@ -149,7 +149,7 @@ build_repository() { export PARENT_USR_DIR="$USR_DIR" pushd "$repo_dir" >/dev/null || return 1 - if ! "$full_script"; then + if ! "$full_script" "./cov_docker_script/component_config.json"; then err "Build script failed" popd >/dev/null return 1 From dbc2e60d6079c564765a6c2c323c7ad05d9a1e86 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:29:19 +0000 Subject: [PATCH 4/7] Updated Component_dir path --- cov_docker_script/build_native.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cov_docker_script/build_native.sh b/cov_docker_script/build_native.sh index ef5440e..7dd2ca1 100755 --- a/cov_docker_script/build_native.sh +++ b/cov_docker_script/build_native.sh @@ -8,9 +8,7 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CONFIG_FILE="${1:-$SCRIPT_DIR/component_config.json}" -COMPONENT_DIR="${2:-$(cd "$SCRIPT_DIR/../.." && pwd)}" - -echo "COMPONENT_DIR is set to: $COMPONENT_DIR" +COMPONENT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" # Source common utilities source "$SCRIPT_DIR/common_build_utils.sh" From cb2ebd2d12909eecb0f13511efd68197e8d99a92 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Thu, 5 Feb 2026 17:04:21 +0000 Subject: [PATCH 5/7] Updated execute_commands function --- cov_docker_script/common_build_utils.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/cov_docker_script/common_build_utils.sh b/cov_docker_script/common_build_utils.sh index f401231..c0de27b 100755 --- a/cov_docker_script/common_build_utils.sh +++ b/cov_docker_script/common_build_utils.sh @@ -255,15 +255,24 @@ build_meson() { execute_commands() { local repo_dir="$1" config_file="$2" index="$3" - pushd "$repo_dir" >/dev/null || return 1 - + # Read command count and commands BEFORE changing directories local cmd_count cmd_count=$(jq ".dependencies.repos[$index].build.commands | length" "$config_file") + # Read all commands into an array before pushd + local commands=() local i=0 while [[ $i -lt $cmd_count ]]; do - local cmd - cmd=$(jq -r ".dependencies.repos[$index].build.commands[$i]" "$config_file") + commands+=("$(jq -r ".dependencies.repos[$index].build.commands[$i]" "$config_file")") + i=$((i + 1)) + done + + pushd "$repo_dir" >/dev/null || return 1 + + # Execute commands from the array + i=0 + while [[ $i -lt $cmd_count ]]; do + local cmd="${commands[$i]}" step "Executing: $cmd" if ! eval "$cmd"; then err "Command failed: $cmd" From 0aadfce93c6dffdc67f13c4aabde3d5c0cc12c70 Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Fri, 6 Feb 2026 05:41:40 +0000 Subject: [PATCH 6/7] Updated to copy hpp files from headers --- cov_docker_script/common_build_utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cov_docker_script/common_build_utils.sh b/cov_docker_script/common_build_utils.sh index c0de27b..7193ee3 100755 --- a/cov_docker_script/common_build_utils.sh +++ b/cov_docker_script/common_build_utils.sh @@ -57,7 +57,7 @@ clone_repo() { ok "$name cloned successfully" git -C "$dest" submodule update --init --recursive --remote - ok "$name Doing git submodule update" + ok "$name git submodule update done" return 0 } @@ -72,7 +72,7 @@ copy_headers() { if [[ -d "$src" ]]; then log "Copying headers: $src → $dst" - if ! find "$src" -maxdepth 1 -name "*.h" -exec cp {} "$dst/" \; 2>/dev/null; then + if ! find "$src" -maxdepth 1 -name "*.h*" -exec cp {} "$dst/" \; 2>/dev/null; then warn "No headers found in $src" fi else From 99bbcad9639ce4549ac84404d5fd22889961f56d Mon Sep 17 00:00:00 2001 From: Hirrangandhi Devaraj <208949566+hirrangandhid@users.noreply.github.com> Date: Fri, 6 Feb 2026 06:28:48 +0000 Subject: [PATCH 7/7] Updated checks for git submodule --- cov_docker_script/common_build_utils.sh | 11 +++++++++-- cov_docker_script/setup_dependencies.sh | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cov_docker_script/common_build_utils.sh b/cov_docker_script/common_build_utils.sh index 7193ee3..0bb9f88 100755 --- a/cov_docker_script/common_build_utils.sh +++ b/cov_docker_script/common_build_utils.sh @@ -56,8 +56,15 @@ clone_repo() { fi ok "$name cloned successfully" - git -C "$dest" submodule update --init --recursive --remote - ok "$name git submodule update done" + if [[ -f "$dest/.gitmodules" ]]; then + git -C "$dest" submodule update --init --recursive --remote || { + err "$name git submodule update failed" + return 1 + } + ok "$name git submodule update done!" + else + ok "$name has no submodules, skipping submodule update" + fi return 0 } diff --git a/cov_docker_script/setup_dependencies.sh b/cov_docker_script/setup_dependencies.sh index 1bc1e89..7a5828f 100755 --- a/cov_docker_script/setup_dependencies.sh +++ b/cov_docker_script/setup_dependencies.sh @@ -149,7 +149,7 @@ build_repository() { export PARENT_USR_DIR="$USR_DIR" pushd "$repo_dir" >/dev/null || return 1 - if ! "$full_script" "./cov_docker_script/component_config.json"; then + if ! "$full_script" "$CONFIG_FILE"; then err "Build script failed" popd >/dev/null return 1