From ddcab3a6cfa1b1ce230934aefbdb2681ddc98665 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux <raphael.defosseux@eurecom.fr> Date: Mon, 30 Jul 2018 13:17:27 +0200 Subject: [PATCH] CI: fix in executing in python the eNB process added slave job trigger for testing Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr> --- ci-scripts/Jenkinsfile-gitlab | 23 +++++++++++++++++++++++ ci-scripts/main.py | 4 +--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index 73d13732f3..00f45355dc 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -204,6 +204,29 @@ pipeline { //} } } + stage ("Test FDD - Band 7 - B210") { + steps { + script { + if ("MERGE".equals(env.gitlabActionType)) { + build job: 'eNB-CI-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)), + string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)), + booleanParam(name: 'eNB_mergeRequest', value: true) + ] + } else { + build job: 'eNB-CI-FDD-Band7-B210', + parameters: [ + string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)), + string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)), + booleanParam(name: 'eNB_mergeRequest', value: false) + ] + } + } + } + } } post { always { diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 71158416dc..3b1536469e 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -254,9 +254,7 @@ class SSHConnection(): self.command('source oaienv', '\$', 5) self.command('cd cmake_targets', '\$', 5) # Replacing with a nohup and a direct redirection of stdout to a file - self.command('echo ' + self.eNBPassword + ' | nohup sudo -S -E ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + ' > enb_' + SSH.testCase_id + '.log 2>&1 &', '\$', 5) - # Using a tail -f with result with an unexpected timeout message - #self.command('tail -f enb_' + SSH.testCase_id + '.log', 'got sync', 60) + self.command('echo ' + self.eNBPassword + ' | nohup sudo -S -E stdbuf -o0 ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + ' > enb_' + SSH.testCase_id + '.log 2>&1 &', '\$', 5) time.sleep(6) doLoop = True loopCounter = 10 -- GitLab