runtests.sh: uncomment the xmlstarlet checking

This commit is contained in:
Daniel Marjamäki 2019-01-23 09:40:43 +01:00
parent 8356ec6774
commit c773e6ed10
1 changed files with 21 additions and 20 deletions

View File

@ -169,23 +169,24 @@ ${CPPCHECK} ${CPPCHECK_OPT_CHECK_LIB} --inconclusive --library=boost ${DIR}boost
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=boost ${DIR}boost.cpp ${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=boost ${DIR}boost.cpp
# Check the syntax of the defines in the configuration files # Check the syntax of the defines in the configuration files
# FIXME: This is temporarily commented out, xmllint is preferred set +e
#set +e xmlstarlet --version
#xmlstarlet --version XMLSTARLET_RETURNCODE=$?
#XMLSTARLET_RETURNCODE=$? set -e
#set -e if [ $XMLSTARLET_RETURNCODE -ne 0 ]; then
#if [ $XMLSTARLET_RETURNCODE -ne 0 ]; then echo "xmlstarlet needed to extract defines, skipping defines check."
# echo "xmlstarlet needed to extract defines, skipping defines check." else
#else for configfile in ${CFG}*.cfg; do
# for configfile in ${CFG}*.cfg; do echo "Checking defines in $configfile"
# echo "Checking defines in $configfile" # Disable debugging output temporarily since there could be many defines
# # Disable debugging output temporarily since there could be many defines set +x
# set +x # XMLStarlet returns 1 if no elements were found which is no problem here
# # XMLStarlet returns 1 if no elements were found which is no problem here set +e
# set +e EXTRACTED_DEFINES=$(xmlstarlet sel -t -m '//define' -c . -n <$configfile)
# EXTRACTED_DEFINES=$(xmlstarlet sel -t -m '//define' -c . -n <$configfile) set -e
# set -e EXTRACTED_DEFINES=$(echo "$EXTRACTED_DEFINES" | sed 's/<define name="/#define /g' | sed 's/" value="/ /g' | sed 's/"\/>//g')
# EXTRACTED_DEFINES=$(echo "$EXTRACTED_DEFINES" | sed 's/<define name="/#define /g' | sed 's/" value="/ /g' | sed 's/"\/>//g') echo "$EXTRACTED_DEFINES" | gcc -fsyntax-only -xc -Werror -
# echo "$EXTRACTED_DEFINES" | gcc -fsyntax-only -xc -Werror - done
# done fi
#fi
echo SUCCESS