From 10bbe356323e68a2e206b8ccb8de984933fd1282 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Wed, 5 Jun 2019 17:41:44 -0400 Subject: [PATCH] gerrit: bt2: add dev and prod mode Signed-off-by: Jonathan Rajotte --- jobs/babeltrace.yaml | 7 ++++++- scripts/babeltrace/build.sh | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/jobs/babeltrace.yaml b/jobs/babeltrace.yaml index 650ee2d..5de63d8 100644 --- a/jobs/babeltrace.yaml +++ b/jobs/babeltrace.yaml @@ -318,7 +318,7 @@ node: 'master' # Applies only to matrix flyweight task execution-strategy: combination-filter: | - (build=="std" && conf=="python-bindings") || (arch=="amd64") + ((build=="std" && conf=="python-bindings" && bt2_mode=="std") || (arch=="amd64")) && (! (arch="amd64" && (build=="oot" || build=="dist") && bt2_mode=="dev")) axes: - axis: type: slave @@ -332,6 +332,10 @@ type: user-defined name: build values: '{obj:build}' + - axis: + type: user-defined + name: bt2_mode + values: '{obj:bt2_mode}' <<: *babeltrace_build_builders_defaults <<: *babeltrace_build_publishers_gerrit @@ -669,3 +673,4 @@ arch: !!python/tuple [amd64, armhf, arm64, powerpc, ppc64el, i386] build: !!python/tuple [std, oot, dist] conf: !!python/tuple [std, python-bindings] + bt2_mode: !!python/tuple [dev, std] diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index 8ef4008..da5f4ab 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -74,6 +74,7 @@ arch=${arch:-} conf=${conf:-} build=${build:-} cc=${cc:-} +bt2_mode=${bt2_mode:-} SRCDIR="$WORKSPACE/src/babeltrace" @@ -197,9 +198,18 @@ cd "$SRCDIR" eval "$(grep '^PACKAGE_VERSION=' ./configure)" # Enable dev mode by default for BT 2.0 builds -export BABELTRACE_DEBUG_MODE=1 -export BABELTRACE_DEV_MODE=1 -export BABELTRACE_MINIMAL_LOG_LEVEL=VERBOSE +case "$bt2_mode" in +dev) + echo "Developer mode" + export BABELTRACE_DEBUG_MODE=1 + export BABELTRACE_DEV_MODE=1 + export BABELTRACE_MINIMAL_LOG_LEVEL=VERBOSE + ;; +*) + echo "Production mode (Default)" + export BABELTRACE_MINIMAL_LOG_LEVEL=INFO + ;; +esac # Set configure options for each build configuration CONF_OPTS="" -- 2.34.1