From 631a1f7394113bb99aeafb72c092e7bfe44e83a2 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 1 Aug 2024 11:50:41 +0200 Subject: [PATCH 1/2] fix: make DEBUG a flag --- integration_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests.py b/integration_tests.py index d771c7e911c..9e6aa773d17 100755 --- a/integration_tests.py +++ b/integration_tests.py @@ -34,6 +34,7 @@ "DIRAC_FEWER_CFG_LOCKS": None, "DIRAC_USE_JSON_ENCODE": None, "INSTALLATION_BRANCH": "", + "DEBUG": "Yes", } DIRACX_OPTIONS = () DEFAULT_MODULES = {"DIRAC": Path(__file__).parent.absolute()} @@ -1118,7 +1119,6 @@ def _create_iam_group_membership( def _make_config(modules, flags, release_var, editable): config = { - "DEBUG": "True", # MYSQL Settings "DB_USER": DB_USER, "DB_PASSWORD": DB_PASSWORD, From 0e5fbc3830ccdf8228e7a39dce12112949006bc2 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 1 Aug 2024 12:59:33 +0200 Subject: [PATCH 2/2] test: use VERBOSE for non-debug --- tests/CI/install_server.sh | 5 +++-- tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh | 4 +++- .../WorkloadManagementSystem/Test_dirac-jobexec.sh | 4 +++- tests/Jenkins/dirac_ci.sh | 4 +++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/CI/install_server.sh b/tests/CI/install_server.sh index 7924979975a..0fb2f76a6d8 100755 --- a/tests/CI/install_server.sh +++ b/tests/CI/install_server.sh @@ -12,12 +12,13 @@ set -x source CONFIG -if [ -n "$DEBUG" ] -then +# if the DEBUG variable is set and its values is "Yes", we run in DEBUG mode +if [ "$DEBUG" = "Yes" ]; then echo '==> Running in DEBUG mode' DEBUG='-ddd' else echo '==> Running in non-DEBUG mode' + DEBUG='-dd' fi echo -e "*** $(date -u) **** Getting the tests ****\n" diff --git a/tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh b/tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh index f444bf91840..c96c4ede664 100755 --- a/tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh +++ b/tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh @@ -7,11 +7,13 @@ echo "\n======> Test_TimeLeft <======\n" -if [[ ! -z "$DEBUG" ]]; then +# if the DEBUG variable is set and its values is "Yes", we run in DEBUG mode +if [ "$DEBUG" = "Yes" ]; then echo '==> Running in DEBUG mode' DEBUG='-ddd' else echo '==> Running in non-DEBUG mode' + DEBUG='-dd' fi SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" diff --git a/tests/Integration/WorkloadManagementSystem/Test_dirac-jobexec.sh b/tests/Integration/WorkloadManagementSystem/Test_dirac-jobexec.sh index b6bf4d7fd19..ba9fb8d732b 100755 --- a/tests/Integration/WorkloadManagementSystem/Test_dirac-jobexec.sh +++ b/tests/Integration/WorkloadManagementSystem/Test_dirac-jobexec.sh @@ -7,11 +7,13 @@ echo "\n======> Test_dirac-jobexec <======\n" -if [[ ! -z "$DEBUG" ]]; then +# if the DEBUG variable is set and its values is "Yes", we run in DEBUG mode +if [ "$DEBUG" = "Yes" ]; then echo '==> Running in DEBUG mode' DEBUG='-ddd' else echo '==> Running in non-DEBUG mode' + DEBUG='-dd' fi SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" diff --git a/tests/Jenkins/dirac_ci.sh b/tests/Jenkins/dirac_ci.sh index 744ac4316fa..f96613e2116 100644 --- a/tests/Jenkins/dirac_ci.sh +++ b/tests/Jenkins/dirac_ci.sh @@ -45,11 +45,13 @@ # Def of environment variables: -if [[ "${DEBUG}" ]]; then +# if the DEBUG variable is set and its values is "Yes", we run in DEBUG mode +if [ "$DEBUG" = "Yes" ]; then echo "==> Running in DEBUG mode" DEBUG='-ddd' else echo "==> Running in non-DEBUG mode" + DEBUG='-dd' fi if [[ "$WORKSPACE" ]]; then