diff --git a/.github/workflows/diff.yaml b/.github/workflows/diff.yaml
index 1b8e36810..7746ddb91 100644
--- a/.github/workflows/diff.yaml
+++ b/.github/workflows/diff.yaml
@@ -267,8 +267,8 @@ jobs:
       - name: Run e2e tests
         run: |
           cd tests
-          ./setup.sh
-          source ve3/bin/activate
+          ./setup.sh /opt/toolchain-v4/activate
+          source ve3/bin/activate_e2e
           cd e2e
           ./run.sh
 
diff --git a/.github/workflows/release_centos8.yaml b/.github/workflows/release_centos8.yaml
index 7096809e7..acf2cb813 100644
--- a/.github/workflows/release_centos8.yaml
+++ b/.github/workflows/release_centos8.yaml
@@ -266,8 +266,8 @@ jobs:
       - name: Run e2e tests
         run: |
           cd tests
-          ./setup.sh
-          source ve3/bin/activate
+          ./setup.sh /opt/toolchain-v4/activate
+          source ve3/bin/activate_e2e
           cd e2e
           ./run.sh
 
diff --git a/.github/workflows/release_debian10.yaml b/.github/workflows/release_debian10.yaml
index b2c514630..28c8c1026 100644
--- a/.github/workflows/release_debian10.yaml
+++ b/.github/workflows/release_debian10.yaml
@@ -265,8 +265,8 @@ jobs:
       - name: Run e2e tests
         run: |
           cd tests
-          ./setup.sh
-          source ve3/bin/activate
+          ./setup.sh /opt/toolchain-v4/activate
+          source ve3/bin/activate_e2e
           cd e2e
           ./run.sh
 
diff --git a/.github/workflows/release_ubuntu2004.yaml b/.github/workflows/release_ubuntu2004.yaml
index 735d4d81c..fd1f76463 100644
--- a/.github/workflows/release_ubuntu2004.yaml
+++ b/.github/workflows/release_ubuntu2004.yaml
@@ -265,8 +265,8 @@ jobs:
       - name: Run e2e tests
         run: |
           cd tests
-          ./setup.sh
-          source ve3/bin/activate
+          ./setup.sh /opt/toolchain-v4/activate
+          source ve3/bin/activate_e2e
           cd e2e
           ./run.sh
 
diff --git a/tests/setup.sh b/tests/setup.sh
index 9c1e7d20c..c4b2ceb10 100755
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -49,3 +49,46 @@ popd > /dev/null
 deactivate
 
 "$DIR"/e2e/graphql/setup.sh
+
+# Check if setup needs to setup additional variables
+if [ $# == 1 ]; then
+    toolchain=$1
+    if [ -f "$toolchain" ]; then
+        # Get the LD_LIB from toolchain
+        set +u
+        OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+        source $toolchain
+        NEW_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+        deactivate
+        set -u
+
+        # Wrapper used to setup the correct libraries
+        tee -a ve3/bin/activate_e2e <<EOF
+#!/bin/bash
+
+# Function to set the environment variable
+set_env_variable() {
+    export LD_LIBRARY_PATH=$NEW_LD_LIBRARY_PATH
+}
+
+# Function to activate the virtual environment and set the environment variable
+activate_e2e() {
+    source ve3/bin/activate
+    set_env_variable
+}
+
+# Function to deactivate the virtual environment and unset the environment variable
+deactivate_e2e() {
+    deactivate
+    export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH
+}
+
+# Activate the virtual environment and set the environment variable
+activate_e2e
+EOF
+
+        chmod +x ve3/bin/activate_e2e
+    else
+        echo "Error: The toolchain virtual enviroonment activation is not a file."
+    fi
+fi