diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7681cc87..e82c31e3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,7 +23,6 @@ jobs: if: "!contains(github.event.commits[0].message, '[debug]')" env: PDO_INTERPRETER: ${{ matrix.interpreter }} - PDO_DEBUG_BUILD: 1 PDO_LOG_LEVEL: warning run: | # The creation of a dummy branch is necessary for the CI tests @@ -38,7 +37,6 @@ jobs: if: "contains(github.event.commits[0].message, '[debug]')" env: PDO_INTERPRETER: ${{ matrix.interpreter }} - PDO_DEBUG_BUILD: 1 PDO_LOG_LEVEL: debug run: | # The creation of a dummy branch is necessary for the CI tests diff --git a/build/cmake/ProjectVariables.cmake b/build/cmake/ProjectVariables.cmake index dd763b66..5b393839 100644 --- a/build/cmake/ProjectVariables.cmake +++ b/build/cmake/ProjectVariables.cmake @@ -20,7 +20,7 @@ ADD_COMPILE_OPTIONS(-m64 -fvisibility=hidden -fpie -fPIC -fstack-protector) ADD_COMPILE_OPTIONS($<$:-std=c++11>) -OPTION(PDO_DEBUG_BUILD "Build with debugging turned on" 0) +OPTION(PDO_DEBUG_BUILD "Build with debugging turned on" 1) IF (DEFINED ENV{PDO_DEBUG_BUILD}) SET(PDO_DEBUG_BUILD $ENV{PDO_DEBUG_BUILD}) diff --git a/docker/Makefile b/docker/Makefile index d18fab94..174f31eb 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -26,7 +26,7 @@ PDO_SOURCE_ROOT ?= $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/../ # PDO_DEBUG_BUILD # The flag that determines the build type (debug or not). -PDO_DEBUG_BUILD ?= ${PDO_DEBUG_BUILD:-0} +PDO_DEBUG_BUILD ?= 1 # PDO_REPO -- # The URL or path to the git repository, the default uses the current repository diff --git a/docker/pdo_ccf.dockerfile b/docker/pdo_ccf.dockerfile index 69832c83..fbbd9b27 100644 --- a/docker/pdo_ccf.dockerfile +++ b/docker/pdo_ccf.dockerfile @@ -30,7 +30,7 @@ ARG REBUILD=0 ARG SGX_MODE=SIM ENV SGX_MODE=$SGX_MODE -ARG PDO_DEBUG_BUILD=0 +ARG PDO_DEBUG_BUILD=1 ENV PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD} # XFER_DIR is the directory where the networkcert.pem file is diff --git a/docker/pdo_client.dockerfile b/docker/pdo_client.dockerfile index df44ce1d..9e697440 100644 --- a/docker/pdo_client.dockerfile +++ b/docker/pdo_client.dockerfile @@ -42,7 +42,7 @@ USER $UNAME # ----------------------------------------------------------------- ARG REBUILD=0 -ARG PDO_DEBUG_BUILD=0 +ARG PDO_DEBUG_BUILD=1 ENV PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD} ARG PDO_LEDGER_TYPE=ccf diff --git a/docker/pdo_services.dockerfile b/docker/pdo_services.dockerfile index 692e6427..f8c8c05e 100644 --- a/docker/pdo_services.dockerfile +++ b/docker/pdo_services.dockerfile @@ -30,7 +30,7 @@ ARG REBUILD=0 ARG SGX_MODE=SIM ENV SGX_MODE $SGX_MODE -ARG PDO_DEBUG_BUILD=0 +ARG PDO_DEBUG_BUILD=1 ENV PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD} ARG PDO_LEDGER_TYPE=ccf diff --git a/docker/test.yaml b/docker/test.yaml index 8bbb933c..96b11fcc 100644 --- a/docker/test.yaml +++ b/docker/test.yaml @@ -29,12 +29,12 @@ services: environment: - PDO_VERSION=${PDO_VERSION} - PDO_LOG_LEVEL=${PDO_LOG_LEVEL:-info} - - PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-0} + - PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-1} entrypoint: /project/pdo/tools/run_services_tests.sh client_container: environment: - PDO_VERSION=${PDO_VERSION} - PDO_LOG_LEVEL=${PDO_LOG_LEVEL:-info} - - PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-0} + - PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-1} entrypoint: /project/pdo/tools/run_client_tests.sh diff --git a/docker/tools/environment.sh b/docker/tools/environment.sh index f6407b12..da47bb95 100755 --- a/docker/tools/environment.sh +++ b/docker/tools/environment.sh @@ -25,7 +25,7 @@ export SGX_MODE=${SGX_MODE:-SIM} export PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE:-ccf} export PDO_INTERPRETER=${PDO_INTERPRETER:-wawaka} export WASM_MEM_CONFIG=${WASM_MEM_CONFIG:-MEDIUM} -export PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-0} +export PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-1} # these variables are internal to the layout of the container and immutable export PDO_SOURCE_ROOT=/project/pdo/src diff --git a/docs/environment.md b/docs/environment.md index 3e652f14..2625f1d6 100644 --- a/docs/environment.md +++ b/docs/environment.md @@ -90,7 +90,7 @@ will be exported. Defaults to HOSTNAME. ### `PDO_DEBUG_BUILD` -(default: 0) +(default: 1) `PDO_DEBUG_BUILD` builds PDO modules for debugging. This includes compile flags, logging statements in the enclave, etc. Since diff --git a/eservice/setup.py b/eservice/setup.py index 45dffc9b..96768840 100644 --- a/eservice/setup.py +++ b/eservice/setup.py @@ -54,7 +54,7 @@ ## ----------------------------------------------------------------- ## set up the contract enclave ## ----------------------------------------------------------------- -debug_flag_env = os.environ.get('PDO_DEBUG_BUILD', '0') +debug_flag_env = os.environ.get('PDO_DEBUG_BUILD', '1') if debug_flag_env not in ['0', '1'] : print(f'error: PDO_DEBUG_BUILD must be 0 or 1, current value is {debug_flag_env}') sys.exit(2) diff --git a/pservice/setup.py b/pservice/setup.py index db9bf460..47f3d9cf 100644 --- a/pservice/setup.py +++ b/pservice/setup.py @@ -52,7 +52,7 @@ ## ----------------------------------------------------------------- ## set up the PService enclave ## ----------------------------------------------------------------- -debug_flag_env = os.environ.get('PDO_DEBUG_BUILD', '0') +debug_flag_env = os.environ.get('PDO_DEBUG_BUILD', '1') if debug_flag_env not in ['0', '1'] : print(f'error: PDO_DEBUG_BUILD must be 0 or 1, current value is {debug_flag_env}') sys.exit(2) diff --git a/python/setup.py b/python/setup.py index 69cec5d1..de7ca6ff 100644 --- a/python/setup.py +++ b/python/setup.py @@ -48,7 +48,7 @@ # note that setuptools does not make it easy to pass custom command # line parameters so we have to use environment variables # ----------------------------------------------------------------- -debug_flag = int(os.environ.get('PDO_DEBUG_BUILD', 0)) +debug_flag = int(os.environ.get('PDO_DEBUG_BUILD', 1)) if debug_flag : print("Build debug")