Commit 1a501115 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: fix the HTML reporting

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 380ce46c
......@@ -31,6 +31,7 @@ source $THIS_SCRIPT_PATH/build_helper
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_fb_folly_from_source(){
echo "Starting to install folly"
if [ $1 -eq 0 ]; then
OPTION=""
read -p "Do you want to install FaceBook folly (github)? <y/N> " prompt
......@@ -146,7 +147,7 @@ install_fb_folly_from_source(){
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
echo_success "End of folly installation"
echo_success "folly installation complete"
return 0
}
......@@ -37,6 +37,7 @@ source $THIS_SCRIPT_PATH/build_helper.fb_folly
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_fmt() {
echo "Starting to install fmt"
if [ $1 -eq 0 ]; then
read -p "Do you want to install open-source formatting library for C++ ? <y/N> " prompt
OPTION=""
......@@ -65,12 +66,14 @@ install_fmt() {
cd /tmp
rm -rf /tmp/fmt*
fi
echo "fmt installation complete"
return 0
}
#-------------------------------------------------------------------------------
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_spdlog_from_git() {
echo "Starting to install spdlog"
if [ $1 -eq 0 ]; then
read -p "Do you want to install spdlog ? <y/N> " prompt
OPTION=""
......@@ -103,6 +106,7 @@ install_spdlog_from_git() {
sed -i '/#define SPDLOG_ENABLE_SYSLOG/s/^\/\///g' include/spdlog/tweakme.h
popd
fi
echo "spdlog installation complete"
return 0
}
......@@ -110,6 +114,7 @@ install_spdlog_from_git() {
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_pistache_from_git() {
echo "Starting to install pistache"
if [ $1 -eq 0 ]; then
read -p "Do you want to install Pistache ? <y/N> " prompt
OPTION="-y"
......@@ -148,6 +153,7 @@ install_pistache_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
echo "pistache installation complete"
return 0
}
......@@ -158,6 +164,7 @@ install_pistache_from_git() {
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_nlohmann_from_git() {
echo "Starting to install Nlohmann Json"
if [ $1 -eq 0 ]; then
read -p "Do you want to install Nlohmann Json ? <y/N> " prompt
OPTION=""
......@@ -196,6 +203,7 @@ install_nlohmann_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
echo "Nlohmann Json installation complete"
return 0
}
......@@ -203,6 +211,7 @@ install_nlohmann_from_git() {
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_nghttp2_from_git() {
echo "Starting to install nghttp2"
if [ $1 -eq 0 ]; then
read -p "Do you want to install nghttp2 ? <y/N> " prompt
OPTION=""
......@@ -284,6 +293,7 @@ install_nghttp2_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
echo "nghttp2 installation complete"
return 0
}
......@@ -293,6 +303,7 @@ install_nghttp2_from_git() {
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_cpp_jwt_from_git() {
echo "Starting to install cpp_jwt"
if [ $1 -eq 0 ]; then
read -p "Do you want to install CPP-JWT ? <y/N> " prompt
OPTION=""
......@@ -357,6 +368,7 @@ install_cpp_jwt_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
echo "cpp_jwt installation complete"
return 0
}
#-------------------------------------------------------------------------------
......@@ -400,7 +412,7 @@ check_install_nrf_deps() {
automake \
bison \
build-essential \
cmake \
$CMAKE \
daemon \
doxygen \
flex \
......@@ -412,6 +424,7 @@ check_install_nrf_deps() {
automake \
bison \
$CMAKE \
make \
doxygen \
flex \
gdb \
......@@ -478,6 +491,7 @@ check_install_nrf_deps() {
echo "Install distro libs"
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
ret=$?;[[ $ret -ne 0 ]] && return $ret
echo "distro libs installation complete"
# Use fmt lib included in spdlog
#install_fmt $1
......@@ -501,6 +515,7 @@ check_install_nrf_deps() {
install_cpp_jwt_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
$SUDO ldconfig
return 0
}
#-------------------------------------------------------------------------------
......
......@@ -464,8 +464,6 @@ class HtmlReport():
section_end_pattern = 'build_nrf --clean --Verbose --build-type Release --jobs'
section_status = False
package_install = False
fmt_build_start = False
fmt_build_status = False
folly_build_start = False
folly_build_status = False
spdlog_build_start = False
......@@ -474,6 +472,10 @@ class HtmlReport():
pistache_build_status = False
json_build_start = False
json_build_status = False
nghttp2_build_start = False
nghttp2_build_status = False
cpp_jwt_build_start = False
cpp_jwt_build_status = False
base_image = False
with open(cwd + '/archives/' + logFileName, 'r') as logfile:
for line in logfile:
......@@ -490,35 +492,45 @@ class HtmlReport():
result = re.search('NRF deps installation successful', line)
if result is not None:
status = True
result = re.search('Install fmt from source', line)
result = re.search('distro libs installation complete', line)
if result is not None:
package_install = True
fmt_build_start = True
result = re.search('Installing: /usr/local/lib/pkgconfig/fmt.pc', line)
result = re.search('Starting to install spdlog', line)
if result is not None:
fmt_build_status = True
result = re.search('Cloning into \'folly\'', line)
spdlog_build_start = True
result = re.search('spdlog installation complete', line)
if result is not None and spdlog_build_start:
spdlog_build_status = True
result = re.search('Starting to install folly', line)
if result is not None:
folly_build_start = True
result = re.search('Installing: /usr/local/lib/libfollybenchmark.a', line)
if result is not None:
result = re.search('folly installation complete', line)
if result is not None and folly_build_start:
folly_build_status = True
result = re.search('Install spdlog from', line)
result = re.search('Starting to install pistache', line)
if result is not None:
spdlog_build_start = True
result = re.search('Install Pistache from', line)
if result is not None:
spdlog_build_status = True
pistache_build_start = True
result = re.search('Installing: /usr/local/lib/libpistache.a', line)
if result is not None:
result = re.search('pistache installation complete', line)
if result is not None and pistache_build_start:
pistache_build_status = True
result = re.search('Install Nlohmann Json', line)
if result is not None:
json_build_status = True
result = re.search('Installing: /usr/local/lib/cmake/nlohmann_json/nlohmann_jsonTargets.cmake', line)
result = re.search('Starting to install Nlohmann Json', line)
if result is not None:
json_build_start = True
result = re.search('Nlohmann Json installation complete', line)
if result is not None and json_build_start:
json_build_status = True
result = re.search('Starting to install nghttp2', line)
if result is not None:
nghttp2_build_start = True
result = re.search('nghttp2 installation complete', line)
if result is not None and nghttp2_build_start:
nghttp2_build_status = True
result = re.search('Starting to install cpp_jwt', line)
if result is not None:
cpp_jwt_build_start = True
result = re.search('cpp_jwt installation complete', line)
if result is not None and cpp_jwt_build_start:
cpp_jwt_build_status = True
logfile.close()
if base_image:
cell_msg = ' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>'
......@@ -537,23 +549,17 @@ class HtmlReport():
else:
cell_msg += ' ** Packages Installation: KO\n'
if base_image:
cell_msg += ' ** fmt Installation: N/A\n'
elif fmt_build_status:
cell_msg += ' ** fmt Installation: OK\n'
cell_msg += ' ** spdlog Installation: N/A\n'
elif spdlog_build_status:
cell_msg += ' ** spdlog Installation: OK\n'
else:
cell_msg += ' ** fmt Installation: KO\n'
cell_msg += ' ** spdlog Installation: KO\n'
if base_image:
cell_msg += ' ** folly Installation: N/A\n'
elif folly_build_status:
cell_msg += ' ** folly Installation: OK\n'
else:
cell_msg += ' ** folly Installation: KO\n'
if base_image:
cell_msg += ' ** spdlog Installation: N/A\n'
elif spdlog_build_status:
cell_msg += ' ** spdlog Installation: OK\n'
else:
cell_msg += ' ** spdlog Installation: KO\n'
if base_image:
cell_msg += ' ** pistache Installation: N/A\n'
elif pistache_build_status:
......@@ -566,6 +572,18 @@ class HtmlReport():
cell_msg += ' ** Nlohmann Json Installation: OK\n'
else:
cell_msg += ' ** Nlohmann Json Installation: KO\n'
if base_image:
cell_msg += ' ** nghttp2 Installation: N/A\n'
elif nghttp2_build_status:
cell_msg += ' ** nghttp2 Installation: OK\n'
else:
cell_msg += ' ** nghttp2 Installation: KO\n'
if base_image:
cell_msg += ' ** cpp_jwt Installation: N/A\n'
elif cpp_jwt_build_status:
cell_msg += ' ** cpp_jwt Installation: OK\n'
else:
cell_msg += ' ** cpp_jwt Installation: KO\n'
cell_msg += '</b></pre></td>\n'
else:
cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>'
......
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