From 41acc54f1c5f96def943819a9bc6c7d56bc0620b Mon Sep 17 00:00:00 2001
From: dam1n19 <dam1n19@soton.ac.uk>
Date: Wed, 5 Jul 2023 09:44:01 +0100
Subject: [PATCH] Added debug statements to fnd where set_env is falling over
 in ci

---
 .gitlab-ci.yml | 1 -
 set_env.sh     | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7ee65dc..ad18e34 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,7 +32,6 @@ simulate-nanosoc:
     - echo "Simulation phase started"
     - git submodule foreach --recursive git submodule init
     - git fetch --recurse-submodules
-    - git submodule foreach --recursive git submodule init
     - source set_env.sh
     - sleep 5
   tags:
diff --git a/set_env.sh b/set_env.sh
index 2b5831e..8b26b8d 100755
--- a/set_env.sh
+++ b/set_env.sh
@@ -63,11 +63,17 @@ if [ ! -f $SOCLABS_PROJECT_DIR/.socinit ]; then
     echo "Running First Time Repository Initialisation"
     # Source environment variables for all submodules
     cd $SOCLABS_DESIGN_ROOT
+    echo "1"
     git submodule update --remote --recursive
+    echo "2"
     python3 $SOCLABS_SOCTOOLS_FLOW_DIR/bin/subrepo_checkout.py -b proj-branch -t $SOCLABS_DESIGN_ROOT
+    echo "3"
     #git submodule foreach --recursive git checkout main # TODO: Bug on this line - need to checkout to correct branch
     # Read proj-branch file to find out which branch each subrepo needs to be on
     # git config --file .gitmodules --get-regexp path | awk '{ print $2 }' | while read line; do cd $SOCLABS_PROJECT_DIR/$line && git checkout `grep $line $SOCLABS_PROJECT_DIR/proj-branch | awk '{ print $2 }'` && git pull; done
+    echo "4"
     git restore $SOCLABS_DESIGN_ROOT/.gitmodules
+    echo "5"
     touch $SOCLABS_PROJECT_DIR/.socinit
+    echo "6"
 fi
-- 
GitLab