Commit 845eeae9 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/optimize-ci-time' into integration_2022_wk35

parents d39a7724 a58b3989
...@@ -579,9 +579,17 @@ class Containerize(): ...@@ -579,9 +579,17 @@ class Containerize():
lUserName = self.eNB2UserName lUserName = self.eNB2UserName
lPassWord = self.eNB2Password lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord) lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.') ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
if ret != 0:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close() lSsh.close()
# Going to the Test Server # Going to the Test Server
...@@ -599,15 +607,26 @@ class Containerize(): ...@@ -599,15 +607,26 @@ class Containerize():
lPassWord = self.eNB2Password lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord) lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~') lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
# copyout has no return code and will quit if something fails
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10) lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'):
logging.debug(lSsh.getBefore())
HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60) lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close() lSsh.close()
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'): if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz') os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
def DeployObject(self, HTML, EPC): def DeployObject(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0': if self.eNB_serverId[self.eNB_instance] == '0':
...@@ -683,6 +702,9 @@ class Containerize(): ...@@ -683,6 +702,9 @@ class Containerize():
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)') logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)') logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
status = False status = False
if healthyNb == 1: if healthyNb == 1:
cnt = 0 cnt = 0
...@@ -697,11 +719,12 @@ class Containerize(): ...@@ -697,11 +719,12 @@ class Containerize():
status = True status = True
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m') logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
time.sleep(10) time.sleep(10)
else:
# containers are unhealthy, so we won't start. However, logs are stored at the end
# in UndeployObject so we here store the logs of the unhealthy container to report it
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
mySSH.close() mySSH.close()
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
if status: if status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
else: else:
......
...@@ -921,7 +921,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -921,7 +921,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Build_Proxy': elif action == 'Build_Proxy':
CONTAINERS.BuildProxy(HTML) CONTAINERS.BuildProxy(HTML)
elif action == 'Copy_Image_to_Test': elif action == 'Copy_Image_to_Test':
CONTAINERS.Copy_Image_to_Test_Server(HTML) success = CONTAINERS.Copy_Image_to_Test_Server(HTML)
if not success:
RAN.prematureExit = True
elif action == 'Deploy_Object': elif action == 'Deploy_Object':
CONTAINERS.DeployObject(HTML, EPC) CONTAINERS.DeployObject(HTML, EPC)
if CONTAINERS.exitStatus==1: if CONTAINERS.exitStatus==1:
......
...@@ -237,8 +237,9 @@ compilations() { ...@@ -237,8 +237,9 @@ compilations() {
echo_error "$2 compilation failed" echo_error "$2 compilation failed"
exit 1 exit 1
fi fi
if [ -s $3 ] ; then if [ -s "$3" ] ; then
cp $3 $4 rm -f "$4"
ln -s "$PWD/$3" "$4"
echo_success "$2 compiled" echo_success "$2 compiled"
check_warnings "$dlog/$2.$REL.txt" check_warnings "$dlog/$2.$REL.txt"
else else
......
...@@ -43,6 +43,7 @@ RUN yum update -y && \ ...@@ -43,6 +43,7 @@ RUN yum update -y && \
tzdata \ tzdata \
procps-ng \ procps-ng \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
net-tools \ net-tools \
......
...@@ -53,6 +53,7 @@ RUN apt-get update && \ ...@@ -53,6 +53,7 @@ RUN apt-get update && \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \ iperf \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \ ...@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
tzdata \ tzdata \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
net-tools \ net-tools \
......
...@@ -52,6 +52,7 @@ RUN apt-get update && \ ...@@ -52,6 +52,7 @@ RUN apt-get update && \
net-tools \ net-tools \
iproute2 \ iproute2 \
iputils-ping \ iputils-ping \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -41,6 +41,7 @@ RUN yum update -y && \ ...@@ -41,6 +41,7 @@ RUN yum update -y && \
tzdata \ tzdata \
procps-ng \ procps-ng \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
net-tools \ net-tools \
......
...@@ -47,6 +47,7 @@ RUN apt-get update && \ ...@@ -47,6 +47,7 @@ RUN apt-get update && \
libatlas3-base \ libatlas3-base \
libconfig9 \ libconfig9 \
net-tools \ net-tools \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -44,6 +44,7 @@ RUN yum update -y && \ ...@@ -44,6 +44,7 @@ RUN yum update -y && \
nettle \ nettle \
tzdata \ tzdata \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
iproute \ iproute \
......
...@@ -46,6 +46,7 @@ RUN yum update -y && \ ...@@ -46,6 +46,7 @@ RUN yum update -y && \
iputils \ iputils \
iproute \ iproute \
atlas \ atlas \
gdb \
python3 \ python3 \
python3-pip \ python3-pip \
libXpm \ libXpm \
......
...@@ -50,6 +50,7 @@ RUN apt-get update && \ ...@@ -50,6 +50,7 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
gdb \
python \ python \
python3 \ python3 \
python3-six \ python3-six \
......
...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do ...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then ...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting eNB soft modem" echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do ...@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then ...@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting gNB soft modem" echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do ...@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then ...@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx $PREFIX/bin/uhd_images_downloader.py -t n3xx
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting eNB soft modem" echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do ...@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
#now generate USIM files #now generate USIM files
...@@ -38,6 +42,8 @@ cd $PREFIX ...@@ -38,6 +42,8 @@ cd $PREFIX
$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX $PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then ...@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then
new_args+=("$PREFIX/etc/ue.conf") new_args+=("$PREFIX/etc/ue.conf")
fi fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting LTE UE soft modem" echo "== Starting LTE UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
...@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do ...@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file # render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c} sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done done
# Load the USRP binaries # Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx $PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then elif [[ -v USE_X3XX ]]; then
...@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do ...@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do
shift shift
done done
# enable printing of stack traces on assert
export gdbStacks=1
echo "==================================" echo "=================================="
echo "== Starting NR UE soft modem" echo "== Starting NR UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment