daniel has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37192?usp=email )
Change subject: jenkins-common: Treat -asan builds the same as -master ......................................................................
jenkins-common: Treat -asan builds the same as -master
This fixes the jenkins test failures seen in ttcn3-stp-test-asan. TTCN3 tries to connect to stp via TCP, but since the jenkins.sh script doesn't consider this a build from master the corresponding config is not added to osmo-stp.cfg.
Also change the function names from image_suffix_is_* to osmo_repo_is_* to better reflect what they are doing (instead of how).
Related: OS#6486 Change-Id: Ibf93880345f38668f8dc812d1523b985d368dfcc --- M jenkins-common.sh M ttcn3-bts-test/jenkins.sh M ttcn3-pcu-test/jenkins-sns.sh M ttcn3-pcu-test/jenkins.sh M ttcn3-stp-test/jenkins.sh 5 files changed, 29 insertions(+), 10 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve daniel: Looks good to me, approved
diff --git a/jenkins-common.sh b/jenkins-common.sh index 1caa5dd..5703675 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -536,24 +536,25 @@ exit 1 }
-# Check if IMAGE_SUFFIX starts with "latest" (e.g. "latest-centos8") -image_suffix_is_latest() { +# Check if the "latest" repo is used (e.g. "latest-centos8") +osmo_repo_is_latest() { case "$IMAGE_SUFFIX" in latest*) return 0 ;; *) return 1 ;; esac }
-# Check if IMAGE_SUFFIX starts with "master" (e.g. "master-centos8") -image_suffix_is_master() { +# Check if the "nightly" repo is used (e.g. "master-centos8") +osmo_repo_is_nightly() { case "$IMAGE_SUFFIX" in master*) return 0 ;; + asan*) return 0 ;; *) return 1 ;; esac }
-# Check if IMAGE_SUFFIX starts with "2023q1" (e.g. "2023q1-centos8") -image_suffix_is_2023q1() { +# Check if the "2023q1" repo is used (e.g. "2023q1-centos8") +osmo_repo_is_2023q1() { case "$IMAGE_SUFFIX" in 2023q1*) return 0 ;; *) return 1 ;; diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 38e3760..35415cd 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -126,7 +126,7 @@ }
set_pcuif_version() { - if image_suffix_is_2023q1; then + if osmo_repo_is_2023q1; then sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh index c42ad18..4f55612 100755 --- a/ttcn3-pcu-test/jenkins-sns.sh +++ b/ttcn3-pcu-test/jenkins-sns.sh @@ -10,7 +10,7 @@ set -e
set_pcuif_version() { - if image_suffix_is_2023q1; then + if osmo_repo_is_2023q1; then sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh index f92a08e..dcd0ce9 100755 --- a/ttcn3-pcu-test/jenkins.sh +++ b/ttcn3-pcu-test/jenkins.sh @@ -10,7 +10,7 @@ set -e
set_pcuif_version() { - if image_suffix_is_2023q1; then + if osmo_repo_is_2023q1; then sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-stp-test/jenkins.sh b/ttcn3-stp-test/jenkins.sh index 4f90a4d..b1f02b9 100755 --- a/ttcn3-stp-test/jenkins.sh +++ b/ttcn3-stp-test/jenkins.sh @@ -17,7 +17,7 @@ cp osmo-stp.cfg $VOL_BASE_DIR/stp/
# XXX: M3UA-over-TCP is not supported by osmo-stp <= 1.8.1 -if image_suffix_is_master; then +if osmo_repo_is_nightly; then osmo-config-merge ./osmo-stp.cfg \ ./osmo-stp-tcp.confmerge \ > "$VOL_BASE_DIR/stp/osmo-stp.cfg"