mirror of https://github.com/CGAL/cgal
Optimisations :
- Fix path problems - Unify test_doxygens.sh - use th emax number of cores available for make calls - fix doc of the scripts
This commit is contained in:
parent
82d26e2ab3
commit
36d1a39bfc
|
|
@ -1,4 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
if [ "$1" == '--help' ]; then
|
||||||
|
echo "Usage: $0 <doc 1> [doc 2]"
|
||||||
|
exho "doc 1 and doc 2 are paths to doxygen outputs (doc_output)."
|
||||||
|
echo "Parse the xml output of doc 1 and creates a directory with organized text files."
|
||||||
|
echo "Then, if doc_2 is specified, do the same for its xml output and make the diff between them."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
#Path to the CGAL_Documentation_build_directory/doc_output
|
#Path to the CGAL_Documentation_build_directory/doc_output
|
||||||
PATH_TO_DOC="$1"
|
PATH_TO_DOC="$1"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ "$1" == '--help' ]; then
|
if [ "$1" == '--help' ]; then
|
||||||
echo "Usage: $0 <doxygen_1> [doxygen_2] [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 "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 "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 "If doxygen_2 is not specified, the master branch of doxygen will be cloned, built and used as doxygen_2."
|
||||||
echo "publish_dir is the path to the dir where the testsuite results are kept"
|
echo "publish_dir is the path to the dir where the testsuite results are kept"
|
||||||
|
echo "$0 must be called from doc/scripts"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
#build reference
|
#build reference
|
||||||
PATH_TO_1="$1"
|
PATH_TO_1="$1"
|
||||||
PATH_TO_2="$2"
|
PATH_TO_2="$2"
|
||||||
IS_ARG2=1
|
PUBLISH_DIR="$3"
|
||||||
PUBLISH_DIR="$4"
|
NB_CORES="$(grep -c ^processor /proc/cpuinfo)"
|
||||||
if [ -z $PATH_TO_2 ]; then
|
|
||||||
IS_ARG2=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_TO_1 ]; then
|
if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_TO_1 ]; then
|
||||||
echo "Please specify a valid path to a doxygen executable."
|
echo "Please specify a valid path to a doxygen executable."
|
||||||
|
|
@ -22,17 +20,30 @@ if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ROOT=$PWD/../../..
|
#Find the CGAL directory. If there is a directory called Documentation, this is a branch build.
|
||||||
|
#Else it is from a release.
|
||||||
|
TEMP=$PWD
|
||||||
|
IS_RELEASE=1
|
||||||
|
cd $PWD/../..
|
||||||
|
if [ "$(basename $PWD)" = 'Documentation' ]; then
|
||||||
|
ROOT=$PWD/..
|
||||||
|
IS_RELEASE=0
|
||||||
|
else
|
||||||
|
ROOT=$PWD
|
||||||
|
fi
|
||||||
|
cd $TEMP #scripts
|
||||||
|
|
||||||
|
|
||||||
mkdir ./build_doc
|
mkdir ./build_doc
|
||||||
cd ./build_doc
|
cd ./build_doc
|
||||||
cmake -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
|
cmake -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
|
||||||
make -j7 doc &> /dev/null
|
make -j$NB_CORES doc &> /dev/null
|
||||||
cd ../ #scripts
|
cd ../ #scripts
|
||||||
bash compare_testsuites.sh $PWD/build_doc/doc_output
|
bash compare_testsuites.sh $PWD/build_doc/doc_output
|
||||||
mv ./doc_data ./doc_ref
|
mv ./doc_data ./doc_ref
|
||||||
|
|
||||||
#download and build doxygen_master
|
#download and build doxygen_master
|
||||||
if [ $IS_ARG2 == 0 ] || [ $(basename $PATH_TO_2) != "doxygen" ] || [ ! -e $PATH_TO_2 ]; then
|
if [ -z $PATH_TO_2 ] || [ $(basename $PATH_TO_2) != "doxygen" ] || [ ! -e $PATH_TO_2 ]; then
|
||||||
echo "No second path detected. Cloning Doxygen master branch..."
|
echo "No second path detected. Cloning Doxygen master branch..."
|
||||||
git clone https://github.com/doxygen/doxygen.git doxygen_master &> /dev/null
|
git clone https://github.com/doxygen/doxygen.git doxygen_master &> /dev/null
|
||||||
cd doxygen_master
|
cd doxygen_master
|
||||||
|
|
@ -40,7 +51,7 @@ if [ $IS_ARG2 == 0 ] || [ $(basename $PATH_TO_2) != "doxygen" ] || [ ! -e $PATH_
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. &> /dev/null
|
cmake .. &> /dev/null
|
||||||
make -j7 &> /dev/null
|
make -j$NB_CORES &> /dev/null
|
||||||
cd ../.. #scripts
|
cd ../.. #scripts
|
||||||
PATH_TO_2="$PWD/doxygen_master/build/bin/doxygen"
|
PATH_TO_2="$PWD/doxygen_master/build/bin/doxygen"
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
@ -50,32 +61,39 @@ mv ./build_doc ./doc_dir
|
||||||
mkdir build_doc
|
mkdir build_doc
|
||||||
cd ./build_doc
|
cd ./build_doc
|
||||||
cmake -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_2" ../.. &> /dev/null
|
cmake -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_2" ../.. &> /dev/null
|
||||||
make -j7 doc &> /dev/null
|
make -j$NB_CORES doc &> /dev/null
|
||||||
cd ../ #scripts
|
cd ../ #scripts
|
||||||
DOXYGEN_1=$($PATH_TO_1 --version)
|
DOXYGEN_1=$($PATH_TO_1 --version)
|
||||||
DOXYGEN_2=$($PATH_TO_2 --version)
|
DOXYGEN_2=$($PATH_TO_2 --version)
|
||||||
bash ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/doc_ref $DOXYGEN_1 $DOXYGEN_2
|
bash ./compare_testsuites.sh $PWD/build_doc/doc_output $PWD/doc_ref
|
||||||
#rebuild doc with Doxygen_1 to get the right doc_tags without GENERATE_XML because it ignores the EXCLUDE_SYMBOLS,
|
#rebuild doc with Doxygen_1 to get the right doc_tags without GENERATE_XML because it ignores the EXCLUDE_SYMBOLS,
|
||||||
#which disrupts the logs
|
#which disrupts the logs
|
||||||
mv ./build_doc ./doc_master
|
mv ./build_doc ./doc_master
|
||||||
rm -rf ./doc_dir
|
rm -rf ./doc_dir
|
||||||
mkdir ./doc_dir
|
mkdir ./doc_dir
|
||||||
cd ./doc_dir
|
cd ./doc_dir
|
||||||
cmake -DCGAL_DOC_CREATE_LOGS=true -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
|
cmake -DCGAL_DOC_CREATE_LOGS=true -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
|
||||||
make -j7 doc &> /dev/null
|
make -j$NB_CORES doc &> /dev/null
|
||||||
make -j7 doc &> /dev/null
|
make -j$NB_CORES doc &> /dev/null
|
||||||
cd ..
|
cd .. #scripts
|
||||||
#get VERSION's content
|
#get VERSION's content
|
||||||
cd $ROOT
|
if [ $IS_RELEASE = 0 ]; then
|
||||||
mkdir -p ./build && cd ./build
|
cd $ROOT
|
||||||
cmake ..
|
mkdir -p ./build && cd ./build
|
||||||
CGAL_NAME="$(cat $PWD/VERSION)"
|
cmake ..
|
||||||
|
CGAL_NAME="$(cat $PWD/VERSION)"
|
||||||
|
cd ..$ROOT
|
||||||
|
rm -rf ./build
|
||||||
|
cd $ROOT/Documentation/doc/scripts
|
||||||
|
else
|
||||||
|
CGAL_NAME="$(cat $ROOT/VERSION)"
|
||||||
|
fi
|
||||||
|
|
||||||
#update overview
|
#update overview
|
||||||
cd $ROOT/Documentation/doc/scripts
|
|
||||||
python ./testsuite.py --output-dir $PWD/doc_dir/doc_output/ --doc-log-dir $PWD/doc_dir/doc_log/ \
|
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 --master-dir $PWD/doc_master/doc_output/ \
|
--publish $PUBLISH_DIR --diff $PWD/diff.txt --master-dir $PWD/doc_master/doc_output/ \
|
||||||
--cgal-version "$CGAL_NAME" --do-copy-results --doxygen-version "$DOXYGEN_1" --master-describe "$MASTER_DESCRIBE"
|
--cgal-version "$CGAL_NAME" --do-copy-results --version-to-keep 10 --doxygen-version "$DOXYGEN_1" --master-describe "$MASTER_DESCRIBE"
|
||||||
|
|
||||||
#clean-up
|
#clean-up
|
||||||
rm -rf ./build_doc
|
rm -rf ./build_doc
|
||||||
|
|
@ -83,6 +101,6 @@ rm -rf ./doc_dir
|
||||||
rm -rf ./doc_master
|
rm -rf ./doc_master
|
||||||
rm -rf ./doc_ref
|
rm -rf ./doc_ref
|
||||||
rm -rf ./doc_data
|
rm -rf ./doc_data
|
||||||
if [ $IS_ARG2 == 0 ]; then
|
if [ -z $PATH_TO_2 ]; then
|
||||||
rm -rf ./doxygen_master
|
rm -rf ./doxygen_master
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
if [ "$1" == '--help' ]; then
|
|
||||||
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 "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"
|
|
||||||
IS_ARG2=1
|
|
||||||
PUBLISH_DIR="$4"
|
|
||||||
if [ -z $PATH_TO_2 ]; then
|
|
||||||
IS_ARG2=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z $PATH_TO_1 ] || [ $(basename $PATH_TO_1) != "doxygen" ] || [ ! -e $PATH_TO_1 ]; then
|
|
||||||
echo "Please specify a valid path to a doxygen executable."
|
|
||||||
echo "$0 --help for more information."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
ROOT=/home/cgal-testsuite
|
|
||||||
mkdir ./build_doc
|
|
||||||
cd ./build_doc
|
|
||||||
cmake -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
|
|
||||||
make -j7 doc &> /dev/null
|
|
||||||
cd ../ #scripts
|
|
||||||
bash compare_testsuites.sh $PWD/build_doc/doc_output
|
|
||||||
mv ./doc_data ./doc_ref
|
|
||||||
|
|
||||||
#download and build doxygen_master
|
|
||||||
if [ $IS_ARG2 == 0 ] || [ $(basename $PATH_TO_2) != "doxygen" ] || [ ! -e $PATH_TO_2 ]; then
|
|
||||||
echo "No second path detected. Cloning Doxygen master branch..."
|
|
||||||
git clone https://github.com/doxygen/doxygen.git doxygen_master &> /dev/null
|
|
||||||
cd doxygen_master
|
|
||||||
MASTER_DESCRIBE=$(git describe --tags)
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake .. &> /dev/null
|
|
||||||
make -j7 &> /dev/null
|
|
||||||
cd ../.. #scripts
|
|
||||||
PATH_TO_2="$PWD/doxygen_master/build/bin/doxygen"
|
|
||||||
echo "done."
|
|
||||||
fi
|
|
||||||
#build doc with doxygen master
|
|
||||||
mv ./build_doc ./doc_dir
|
|
||||||
mkdir build_doc
|
|
||||||
cd ./build_doc
|
|
||||||
cmake -DCGAL_GENERATE_XML=ON -DDOXYGEN_EXECUTABLE="$PATH_TO_2" ../.. &> /dev/null
|
|
||||||
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 $DOXYGEN_1 $DOXYGEN_2
|
|
||||||
#rebuild doc with Doxygen_1 to get the right doc_tags without GENERATE_XML because it ignores the EXCLUDE_SYMBOLS,
|
|
||||||
#which disrupts the logs
|
|
||||||
mv ./build_doc ./doc_master
|
|
||||||
rm -rf ./doc_dir
|
|
||||||
mkdir ./doc_dir
|
|
||||||
cd ./doc_dir
|
|
||||||
cmake -DCGAL_DOC_CREATE_LOGS=true -DDOXYGEN_EXECUTABLE="$PATH_TO_1" ../.. &> /dev/null
|
|
||||||
make -j7 doc &> /dev/null
|
|
||||||
make -j7 doc &> /dev/null
|
|
||||||
cd ..
|
|
||||||
#get VERSION's content
|
|
||||||
cd $ROOT
|
|
||||||
CGAL_NAME="$(cat $PWD/VERSION)"
|
|
||||||
|
|
||||||
#update overview
|
|
||||||
cd $ROOT/doc/scripts
|
|
||||||
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 --master-dir $PWD/doc_master/doc_output/ \
|
|
||||||
--cgal-version "$CGAL_NAME" --do-copy-results --version-to-keep 10 --doxygen-version "$DOXYGEN_1" --master-describe "$MASTER_DESCRIBE"
|
|
||||||
|
|
||||||
#clean-up
|
|
||||||
rm -rf ./build_doc
|
|
||||||
rm -rf ./doc_dir
|
|
||||||
rm -rf ./doc_master
|
|
||||||
rm -rf ./doc_ref
|
|
||||||
rm -rf ./doc_data
|
|
||||||
if [ $IS_ARG2 == 0 ]; then
|
|
||||||
rm -rf ./doxygen_master
|
|
||||||
fi
|
|
||||||
|
|
@ -63,7 +63,7 @@ export PYTHONPATH
|
||||||
PATH=/home/cgal-testsuite/local/bin:$PATH
|
PATH=/home/cgal-testsuite/local/bin:$PATH
|
||||||
export PATH
|
export PATH
|
||||||
cd "$PWD/doc/scripts"
|
cd "$PWD/doc/scripts"
|
||||||
bash ./test_doxygen_versions_from_release.sh /home/cgal-testsuite/local/bin/doxygen '' '' /srv/CGAL/www/Members/Manual_doxygen_test
|
bash ./test_doxygen_versions.sh /home/cgal-testsuite/local/bin/doxygen '' /srv/CGAL/www/Members/Manual_doxygen_test
|
||||||
case "$CGAL_RELEASE_ID" in
|
case "$CGAL_RELEASE_ID" in
|
||||||
*-I-*) ln -snf "../Manual_doxygen_test/$CGAL_RELEASE_ID/output" /srv/CGAL/www/doc/master
|
*-I-*) ln -snf "../Manual_doxygen_test/$CGAL_RELEASE_ID/output" /srv/CGAL/www/doc/master
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue