From 7090357e534937ee8f21bb3ac11d34278b57eb41 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux <raphael.defosseux@eurecom.fr> Date: Fri, 27 Sep 2019 16:01:08 +0200 Subject: [PATCH] CI: Adding scenarios for COTS-UE Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr> --- ci-scripts/Jenkinsfile-inria-r2lab | 2 + ci-scripts/main.py | 18 ++-- .../inria/enb_ue_usrp210_band7_epc_start.xml | 4 +- .../enb_ue_usrp210_band7_test_05mhz_tm1.xml | 4 +- .../inria/enb_usrp210_band7_epc_start.xml | 53 +++++++++ .../inria/enb_usrp210_band7_epc_stop.xml | 47 ++++++++ .../enb_usrp210_band7_test_05mhz_tm1.xml | 102 ++++++++++++++++++ ...7_build.xml => ue_usrp210_band7_build.xml} | 0 8 files changed, 217 insertions(+), 13 deletions(-) create mode 100644 ci-scripts/xml_files/inria/enb_usrp210_band7_epc_start.xml create mode 100644 ci-scripts/xml_files/inria/enb_usrp210_band7_epc_stop.xml create mode 100644 ci-scripts/xml_files/inria/enb_usrp210_band7_test_05mhz_tm1.xml rename ci-scripts/xml_files/inria/{ue_band7_build.xml => ue_usrp210_band7_build.xml} (100%) diff --git a/ci-scripts/Jenkinsfile-inria-r2lab b/ci-scripts/Jenkinsfile-inria-r2lab index 7a51666ffe6..6ae75229995 100644 --- a/ci-scripts/Jenkinsfile-inria-r2lab +++ b/ci-scripts/Jenkinsfile-inria-r2lab @@ -176,6 +176,8 @@ pipeline { // Putting the adaptation parameters for the OAI UE sh "ssh -t inria_oaici@faraday.inria.fr 'scp /home/inria_oaici/for-ci/adapt_usim_parameters_${r2labUE0}.sed ${fituser}@${r2labUE0}:/tmp/adapt_usim_parameters.sed'" + sh "ssh -t inria_oaici@faraday.inria.fr 'scp /home/inria_oaici/for-ci/phones_list.txt ${fituser}@${r2labEPC0}:/tmp'" + sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S cp /tmp/phones_list.txt /etc/ci\"'" // Out of rload, the sub-network-interfaces are not up sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:m11 172.16.1.102 up\"'" diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 229f4233c6c..2919ee5ee1d 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -614,10 +614,10 @@ class SSHConnection(): logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS') self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S mkdir -p logs', '\$', 5) - self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f hss.log logs/hss*.* ping*.log iperf*.log', '\$', 5) + self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f hss_' + self.testCase_id + '.log logs/hss*.*', '\$', 5) self.command('echo "oai_hss -j /usr/local/etc/oai/hss_rel14.json" > ./my-hss.sh', '\$', 5) self.command('chmod 755 ./my-hss.sh', '\$', 5) - self.command('sudo daemon --unsafe --name=hss_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/hss.log ./my-hss.sh', '\$', 5) + self.command('sudo daemon --unsafe --name=hss_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/hss_' + self.testCase_id + '.log ./my-hss.sh', '\$', 5) elif re.match('OAI', self.EPCType, re.IGNORECASE): logging.debug('Using the OAI EPC HSS') self.command('cd ' + self.EPCSourceCodePath, '\$', 5) @@ -644,10 +644,10 @@ class SSHConnection(): if re.match('OAI-Rel14-CUPS', self.EPCType, re.IGNORECASE): logging.debug('Using the OAI EPC Release 14 MME') self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) - self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f mme.log', '\$', 5) + self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f mme_' + self.testCase_id + '.log', '\$', 5) self.command('echo "./run_mme --config-file /usr/local/etc/oai/mme.conf --set-virt-if" > ./my-mme.sh', '\$', 5) self.command('chmod 755 ./my-mme.sh', '\$', 5) - self.command('sudo daemon --unsafe --name=mme_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/mme.log ./my-mme.sh', '\$', 5) + self.command('sudo daemon --unsafe --name=mme_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/mme_' + self.testCase_id + '.log ./my-mme.sh', '\$', 5) elif re.match('OAI', self.EPCType, re.IGNORECASE): self.command('cd ' + self.EPCSourceCodePath, '\$', 5) self.command('source oaienv', '\$', 5) @@ -675,14 +675,14 @@ class SSHConnection(): if re.match('OAI-Rel14-CUPS', self.EPCType, re.IGNORECASE): logging.debug('Using the OAI EPC Release 14 SPGW-CUPS') self.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5) - self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f spgwc.log spgwu.log', '\$', 5) + self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f spgwc_' + self.testCase_id + '.log spgwu_' + self.testCase_id + '.log', '\$', 5) self.command('echo "spgwc -c /usr/local/etc/oai/spgw_c.conf" > ./my-spgwc.sh', '\$', 5) self.command('chmod 755 ./my-spgwc.sh', '\$', 5) - self.command('sudo daemon --unsafe --name=spgwc_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/spgwc.log ./my-spgwc.sh', '\$', 5) + self.command('sudo daemon --unsafe --name=spgwc_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/spgwc_' + self.testCase_id + '.log ./my-spgwc.sh', '\$', 5) time.sleep(5) self.command('echo "spgwu -c /usr/local/etc/oai/spgw_u.conf" > ./my-spgwu.sh', '\$', 5) self.command('chmod 755 ./my-spgwu.sh', '\$', 5) - self.command('sudo daemon --unsafe --name=spgwu_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/spgwu.log ./my-spgwu.sh', '\$', 5) + self.command('sudo daemon --unsafe --name=spgwu_daemon --chdir=' + self.EPCSourceCodePath + '/scripts -o ' + self.EPCSourceCodePath + '/scripts/spgwu_' + self.testCase_id + '.log ./my-spgwu.sh', '\$', 5) elif re.match('OAI', self.EPCType, re.IGNORECASE): self.command('cd ' + self.EPCSourceCodePath, '\$', 5) self.command('source oaienv', '\$', 5) @@ -1308,9 +1308,9 @@ class SSHConnection(): count = max_count while count > 0: if self.ADBCentralized: - self.command('stdbuf -o0 adb -s ' + device_id + ' shell "dumpsys telephony.registry" | grep mDataConnectionState', '\$', 15) + self.command('stdbuf -o0 adb -s ' + device_id + ' shell "dumpsys telephony.registry" | grep -m 1 mDataConnectionState', '\$', 15) else: - self.command('ssh ' + self.UEDevicesRemoteUser[idx] + '@' + self.UEDevicesRemoteServer[idx] + ' \'adb -s ' + device_id + ' shell "dumpsys telephony.registry"\' | grep mDataConnectionState', '\$', 60) + self.command('ssh ' + self.UEDevicesRemoteUser[idx] + '@' + self.UEDevicesRemoteServer[idx] + ' \'adb -s ' + device_id + ' shell "dumpsys telephony.registry"\' | grep -m 1 mDataConnectionState', '\$', 60) result = re.search('mDataConnectionState.*=(?P<state>[0-9\-]+)', str(self.ssh.before)) if result is None: logging.debug('\u001B[1;37;41m mDataConnectionState Not Found! \u001B[0m') diff --git a/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_epc_start.xml b/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_epc_start.xml index ed41e8b9770..51aaba439e6 100644 --- a/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_epc_start.xml +++ b/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_epc_start.xml @@ -21,8 +21,8 @@ --> <testCaseList> - <htmlTabRef>build-tab</htmlTabRef> - <htmlTabName>Build</htmlTabName> + <htmlTabRef>epc-start-oai-ue</htmlTabRef> + <htmlTabName>EPC-Start-OAI-UE</htmlTabName> <htmlTabIcon>log-in</htmlTabIcon> <TestCaseRequestedList> 050101 000001 060101 000001 070101 diff --git a/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml b/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml index c429e17b2cd..1471b9a016e 100644 --- a/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml +++ b/ci-scripts/xml_files/inria/enb_ue_usrp210_band7_test_05mhz_tm1.xml @@ -21,8 +21,8 @@ --> <testCaseList> - <htmlTabRef>test-05-tm1</htmlTabRef> - <htmlTabName>Test-05MHz-TM1</htmlTabName> + <htmlTabRef>test-05-tm1-oai-ue</htmlTabRef> + <htmlTabName>Test-05MHz-TM1-OAI-UE</htmlTabName> <htmlTabIcon>tasks</htmlTabIcon> <repeatCount>4</repeatCount> <TestCaseRequestedList> diff --git a/ci-scripts/xml_files/inria/enb_usrp210_band7_epc_start.xml b/ci-scripts/xml_files/inria/enb_usrp210_band7_epc_start.xml new file mode 100644 index 00000000000..5fc3a2e9606 --- /dev/null +++ b/ci-scripts/xml_files/inria/enb_usrp210_band7_epc_start.xml @@ -0,0 +1,53 @@ +<!-- + + Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The OpenAirInterface Software Alliance licenses this file to You under + the OAI Public License, Version 1.1 (the "License"); you may not use this file + except in compliance with the License. + You may obtain a copy of the License at + + http://www.openairinterface.org/?page_id=698 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + For more information about the OpenAirInterface (OAI) Software Alliance: + contact@openairinterface.org + +--> +<testCaseList> + <htmlTabRef>epc-start</htmlTabRef> + <htmlTabName>EPC-Start</htmlTabName> + <htmlTabIcon>log-in</htmlTabIcon> + <TestCaseRequestedList> + 050102 000001 060102 000001 070102 + </TestCaseRequestedList> + <TestCaseExclusionList></TestCaseExclusionList> + + <testCase id="000001"> + <class>IdleSleep</class> + <desc>Sleep</desc> + <idle_sleep_time_in_sec>20</idle_sleep_time_in_sec> + </testCase> + + <testCase id="050102"> + <class>Initialize_HSS</class> + <desc>Initialize HSS</desc> + </testCase> + + <testCase id="060102"> + <class>Initialize_MME</class> + <desc>Initialize MME</desc> + </testCase> + + <testCase id="070102"> + <class>Initialize_SPGW</class> + <desc>Initialize SPGW</desc> + </testCase> + +</testCaseList> diff --git a/ci-scripts/xml_files/inria/enb_usrp210_band7_epc_stop.xml b/ci-scripts/xml_files/inria/enb_usrp210_band7_epc_stop.xml new file mode 100644 index 00000000000..aa1884baf98 --- /dev/null +++ b/ci-scripts/xml_files/inria/enb_usrp210_band7_epc_stop.xml @@ -0,0 +1,47 @@ +<!-- + + Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The OpenAirInterface Software Alliance licenses this file to You under + the OAI Public License, Version 1.1 (the "License"); you may not use this file + except in compliance with the License. + You may obtain a copy of the License at + + http://www.openairinterface.org/?page_id=698 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + For more information about the OpenAirInterface (OAI) Software Alliance: + contact@openairinterface.org + +--> +<testCaseList> + <htmlTabRef>epc-stop</htmlTabRef> + <htmlTabName>EPC-Stop</htmlTabName> + <htmlTabIcon>log-out</htmlTabIcon> + <TestCaseRequestedList> + 050201 060201 070201 + </TestCaseRequestedList> + <TestCaseExclusionList></TestCaseExclusionList> + + <testCase id="050201"> + <class>Terminate_HSS</class> + <desc>Terminate HSS</desc> + </testCase> + + <testCase id="060201"> + <class>Terminate_MME</class> + <desc>Terminate MME</desc> + </testCase> + + <testCase id="070201"> + <class>Terminate_SPGW</class> + <desc>Terminate SPGW</desc> + </testCase> + +</testCaseList> diff --git a/ci-scripts/xml_files/inria/enb_usrp210_band7_test_05mhz_tm1.xml b/ci-scripts/xml_files/inria/enb_usrp210_band7_test_05mhz_tm1.xml new file mode 100644 index 00000000000..7e8e765b97f --- /dev/null +++ b/ci-scripts/xml_files/inria/enb_usrp210_band7_test_05mhz_tm1.xml @@ -0,0 +1,102 @@ +<!-- + + Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The OpenAirInterface Software Alliance licenses this file to You under + the OAI Public License, Version 1.1 (the "License"); you may not use this file + except in compliance with the License. + You may obtain a copy of the License at + + http://www.openairinterface.org/?page_id=698 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + For more information about the OpenAirInterface (OAI) Software Alliance: + contact@openairinterface.org + +--> +<testCaseList> + <htmlTabRef>test-05-tm1</htmlTabRef> + <htmlTabName>Test-05MHz-TM1</htmlTabName> + <htmlTabIcon>tasks</htmlTabIcon> + <repeatCount>4</repeatCount> + <TestCaseRequestedList> + 030201 + 030102 000002 040301 000002 040504 000001 040401 000002 030201 + </TestCaseRequestedList> + <TestCaseExclusionList></TestCaseExclusionList> + + <testCase id="000001"> + <class>IdleSleep</class> + <desc>Sleep for 10 sec</desc> + <idle_sleep_time_in_sec>10</idle_sleep_time_in_sec> + </testCase> + + <testCase id="000002"> + <class>IdleSleep</class> + <desc>Sleep for 3 sec</desc> + <idle_sleep_time_in_sec>3</idle_sleep_time_in_sec> + </testCase> + + <testCase id="030102"> + <class>Initialize_eNB</class> + <desc>Initialize eNB (FDD/Band7/5MHz)</desc> + <Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args> + </testCase> + + <testCase id="030201"> + <class>Terminate_eNB</class> + <desc>Terminate eNB</desc> + </testCase> + + <testCase id="040301"> + <class>Attach_UE</class> + <desc>Attach UE</desc> + </testCase> + + <testCase id="040401"> + <class>Detach_UE</class> + <desc>Detach UE</desc> + </testCase> + + <testCase id="040504"> + <class>Ping</class> + <desc>ping (5MHz - 20 sec)</desc> + <ping_args>-I 192.168.248.159 -c 20</ping_args> + <ping_packetloss_threshold>5</ping_packetloss_threshold> + </testCase> + + <testCase id="040603"> + <class>Iperf</class> + <desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc> + <iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args> + <iperf_packetloss_threshold>50</iperf_packetloss_threshold> + </testCase> + + <testCase id="040604"> + <class>Iperf</class> + <desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc> + <iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args> + <iperf_packetloss_threshold>50</iperf_packetloss_threshold> + </testCase> + + <testCase id="040643"> + <class>Iperf</class> + <desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc> + <iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args> + <iperf_packetloss_threshold>50</iperf_packetloss_threshold> + </testCase> + + <testCase id="040644"> + <class>Iperf</class> + <desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc> + <iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args> + <iperf_packetloss_threshold>50</iperf_packetloss_threshold> + </testCase> + +</testCaseList> diff --git a/ci-scripts/xml_files/inria/ue_band7_build.xml b/ci-scripts/xml_files/inria/ue_usrp210_band7_build.xml similarity index 100% rename from ci-scripts/xml_files/inria/ue_band7_build.xml rename to ci-scripts/xml_files/inria/ue_usrp210_band7_build.xml -- GitLab