From c7c104a6e78160563f497bc7e8856800749d3fa2 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux <raphael.defosseux@eurecom.fr> Date: Mon, 15 Apr 2019 17:28:44 +0200 Subject: [PATCH] CI: adding dummy skeleton stages in pipeline to run L1/RF simulators Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr> --- ci-scripts/Jenkinsfile-gitlab | 30 ++++++++++++++++++++++++++++++ ci-scripts/oai-ci-vm-tool | 32 ++++++++++++++++++++++++++++++++ ci-scripts/runTestOnVM.sh | 2 ++ 3 files changed, 64 insertions(+) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 29d5d761ec..d6959c8fa3 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -371,6 +371,36 @@ pipeline { } } } + stage ("Test L1 simulator") { + steps { + script { + timeout (time: 30, unit: 'MINUTES') { + try { + gitlabCommitStatus(name: "Test L1-sim") { + sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l1-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } + } + } + } + stage ("Test RF simulator") { + steps { + script { + timeout (time: 30, unit: 'MINUTES') { + try { + gitlabCommitStatus(name: "Test RF-sim") { + sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant rf-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" + } + } catch (Exception e) { + currentBuild.result = 'FAILURE' + } + } + } + } + } stage ("Test L2 simulator") { steps { script { diff --git a/ci-scripts/oai-ci-vm-tool b/ci-scripts/oai-ci-vm-tool index c12639173a..c343e24d80 100755 --- a/ci-scripts/oai-ci-vm-tool +++ b/ci-scripts/oai-ci-vm-tool @@ -44,6 +44,7 @@ function variant_usage { echo " # non-OSA Build Variants" echo " --variant flexran-rtc OR -v10" echo " # OpenAirInterface Test Variants" + echo " --variant l1-sim OR -v20" echo " --variant rf-sim OR -v21" echo " --variant l2-sim OR -v22" } @@ -303,6 +304,13 @@ case $key in NBARGS=$[$NBARGS+256] shift ;; + -v20) + VM_NAME=ci-l1-sim + ARCHIVES_LOC=l1_sim + RUN_OPTIONS="complex" + NBARGS=$[$NBARGS+256] + shift + ;; -v21) VM_NAME=ci-rf-sim ARCHIVES_LOC=rf_sim @@ -385,6 +393,12 @@ case $key in BUILD_OPTIONS="cmake . && make -j2" NBARGS=$[$NBARGS+256] ;; + l1-sim) + VM_NAME=ci-l1-sim + ARCHIVES_LOC=l1_sim + RUN_OPTIONS="complex" + NBARGS=$[$NBARGS+256] + ;; rf-sim) VM_NAME=ci-rf-sim ARCHIVES_LOC=rf_sim @@ -589,6 +603,24 @@ then fi if [ $TEST_CMD -eq 1 ] then + # Comment out or delete the following lines if you want to run L1-simulator in your branch and/or merge request + if [[ $VM_NAME =~ .*-l1-sim.* ]] + then + echo "Currently L1-Simulator Testing is not implemented / enabled" + echo "Comment out these lines in ./ci-scripts/oai-ci-vm-tool if you want to run it" + echo "STATUS seems OK" + exit $STATUS + fi + # end to comment out for L1-simulator + # Comment out or delete the following lines if you want to run RF-simulator in your branch and/or merge request + if [[ $VM_NAME =~ .*-rf-sim.* ]] + then + echo "Currently RF-Simulator Testing is not implemented / enabled" + echo "Comment out these lines in ./ci-scripts/oai-ci-vm-tool if you want to run it" + echo "STATUS seems OK" + exit $STATUS + fi + # end to comment out for RF-simulator ARCHIVES_LOC=${ARCHIVES_LOC}/test run_test_on_vm fi diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 01d20475b4..95e712c2c4 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -1474,6 +1474,8 @@ function run_test_on_vm { if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-rf-sim.* ]] then + PING_STATUS=0 + IPERF_STATUS=0 if [ -d $ARCHIVES_LOC ] then rm -Rf $ARCHIVES_LOC -- GitLab