Skip to content

Commit

Permalink
Merge pull request DIRACGrid#7746 from fstagni/90_test_debug_flag
Browse files Browse the repository at this point in the history
fix: make DEBUG a flag
  • Loading branch information
fstagni committed Aug 1, 2024
2 parents 0bf2b7b + 0e5fbc3 commit fd7bb26
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions tests/CI/install_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion tests/Integration/WorkloadManagementSystem/Test_TimeLeft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 )"
Expand Down
4 changes: 3 additions & 1 deletion tests/Jenkins/dirac_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd7bb26

Please sign in to comment.