Skip to content

Testsuite: Integrate some satellite projects #3443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions Scripts/developer_scripts/autotest_cgal
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,43 @@ PLATFORM=""
USE_REFERENCE_PLATFORMS=""
SHOW_PROGRESS=""


# ----------------------------------------------------------------------------------------
#setup sfcgal as a package to be tested
# ----------------------------------------------------------------------------------------
install_sfcgal()
{
if [ -d ${CGAL_DIR}/test/xternal_SFCGAL ]; then
return 0;
fi
#get SFCGAL
git clone https://gitlab.com/Oslandia/SFCGAL.git ${CGAL_DIR}/test/xternal_SFCGAL
#add a test script
pushd ${CGAL_DIR}/xternal_SFCGAL
cat > cgal_test_with_cmake<<EOF
#! /bin/sh
if [ -z "${MAKE_CMD}" ]; then
MAKE_CMD=make
fi
mkdir build
cd build
echo "configuring cmake..."
cmake -DCGAL_DIR="\$CGAL_RELEASE_DIR/lib/cmake/CGAL" -DSFCGAL_BUILD_TESTS=ON -DCMAKE_CXX_FLAGS_RELEASE="-O3" ..
echo "done."
echo "building..."
"${MAKE_CMD}" all
echo "done. Testing.."
if ctest -VV --output-on-failure; then
echo "done. Cleaning up..."
else
exit 1
fi
echo "done."
EOF
chmod +x cgal_test_with_cmake
popd
}

# ----------------------------------------------------------------------------------------
# write to logfile
# $1 = logfile
Expand Down Expand Up @@ -180,10 +217,10 @@ value_of()
remote_command()
{
if [ "${1}" = "localhost" ]; then
eval $2
eval 'TEST_XTERNAL=$TEST_XTERNAL $2'
else
printf "** Logging into host ${1} **\n"
${RSH} ${1} ${MYSHELL} \"${2}\"
${RSH} ${1} ${MYSHELL} \"TEST_XTERNAL=$TEST_XTERNAL ${2}\"
fi
}

Expand Down Expand Up @@ -834,6 +871,10 @@ do
echo "Compiled test/ directory will be kept."
KEEP_TESTS="y"
;;
"-x")
echo "Add the external projects to the testsuite."
TEST_XTERNAL="y"
;;
*)
CGAL_LOCATION=$arg
esac
Expand Down Expand Up @@ -971,6 +1012,10 @@ if [ "${BUILD_HOSTS}" = "localhost" ]; then
fi
fi

if [ -n "${TEST_XTERNAL}" ]; then
install_sfcgal
fi

if [ -z "${DO_NOT_TEST}" ]; then
run_test
fi
Expand Down