This commit is contained in:
Maxime Gimeno 2017-02-20 12:53:51 +01:00
parent a77063109c
commit 85b04e4919
2 changed files with 3 additions and 42 deletions

View File

@ -38,32 +38,3 @@ fi
#diff the output and the reference output, ignoring the differences in whitespaces
diff -u -N -w ./doc_data $DOC_REF > ./diff.txt
#generate an html page showing the status of the diff
CGAL_VERSION=$3
DATE=`date +%Y-%m-%d`
echo "<!DOCTYPE html>" > result.html
echo "<html>" >> result.html
echo " <head>" >> result.html
echo " <meta charset=\"utf-8\" />" >> result.html
echo " <title>Documentation Status</title>" >> result.html
echo " </head>" >> result.html
echo " <body style=\"background-color: #C0C0D0;\"> " >> result.html
echo " <h1 id=\"maintitle\">Documentation Status of $CGAL_VERSION on $DATE</h1> " >> result.html
echo " <p> Difference between Doxygen $4 and Doxygen $5: " >> result.html
#if there is a diff, give a link to show it
if [[ -s ./diff.txt ]]
then
echo "<p> There are differences : <a href=\"diff.txt\">See logs. </a> <br /> " >> result.html
#else just say that everything is fine
else
echo "<p> There is no difference. <br /><br /> " >> result.html
fi
if [ "${FAILURES[0]}" != "" ]; then
echo " Some packages encountered problems while being parsed : <br /><br /> " >> result.html
echo " ${FAILURE[*]} <br /> ">> result.html
fi
echo " </p>" >> result.html
echo " </body>" >> result.html
echo "</html>" >> result.html

View File

@ -1,17 +1,15 @@
#!/bin/bash
if [ "$1" == '--help' ]; then
echo "Usage: $0 <doxygen_1> [doxygen_2] [CGAL_VERSION][publish_dir]"
echo "Usage: $0 <doxygen_1> [doxygen_2] [publish_dir]"
echo "Compares the output of doxygen_1 and doxygen_2 of this CGAL version, "
echo "where doxygen_1 and doxygen_2 are valid paths to doxygen executables."
echo "If doxygen_2 is not specified, the master branch of doxygen will be cloned, built and used as doxygen_2."
echo "CGAL_VERSION is the name that will appear on the results page. Default is CGAL-{version in cmake generated VERSION}"
echo "publish_dir is the path to the dir where the testsuite results are kept"
exit 0
fi
#build reference
PATH_TO_1="$1"
PATH_TO_2="$2"
CGAL_VERSION=$3
IS_ARG2=1
PUBLISH_DIR="$4"
if [ -z $PATH_TO_2 ]; then
@ -23,15 +21,7 @@ if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_
echo "$0 --help for more information."
exit 0
fi
#if no cgal version is specified, ask cmake"
if [ -n CGAL_VERSION ]; then
mkdir ./shallow_build
cd ./shallow_build
cmake ../../../.. &> /dev/null
CGAL_VERSION="CGAL-$(cat VERSION)"
cd ..
rm -rf ./shallow_build
fi
mkdir ./build_doc
cd ./build_doc
cmake -DCGAL_GENERATE_XML=ON -DCGAL_DOC_CREATE_LOGS=true -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
@ -63,7 +53,7 @@ make -j7 doc &> /dev/null
cd ../ #scripts
DOXYGEN_1=$($PATH_TO_1 --version)
DOXYGEN_2=$($PATH_TO_2 --version)
bash ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/doc_ref $CGAL_VERSION $DOXYGEN_1 $DOXYGEN_2
bash ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/doc_ref $DOXYGEN_1 $DOXYGEN_2
#update overview
python ./testsuite.py --output-dir $PWD/doc_dir/doc_output/ --doc-log-dir $PWD/doc_dir/doc_log/ --publish $PUBLISH_DIR --diff $PWD/diff.txt