- call bash instead of only the script

Don't try to test skipped packages in run_testsuite_with_cmake
This commit is contained in:
Maxime Gimeno 2021-02-23 13:12:53 +01:00
parent 4b12f70605
commit 657ba50904
3 changed files with 24 additions and 16 deletions

View File

@ -628,11 +628,17 @@ if [ -f '${LIST_TEST_PACKAGES}' ]; then
cp '${CGAL_TEST_DIR}/makefile2' '${CGAL_BINARY_DIR}/test'
cp '${CGAL_TEST_DIR}/run_testsuite_with_cmake' '${CGAL_BINARY_DIR}/test'
for PACKAGE in \`source '${LIST_TEST_PACKAGES}' '${CGAL_ROOT}'\`; do
if [ -d "${CGAL_TEST_DIR}/\${PACKAGE}" ]; then
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
cp -r "${CGAL_TEST_DIR}/\${PACKAGE}" '${CGAL_BINARY_DIR}/test'
# list all packages in CGAL_TEST_DIR. If PACKAGE is found in LIST_TEST_PACKAGES,
# copy it, else prepare for the special "skipped" case in the table.
for PACKAGE in \$(ls "${CGAL_TEST_DIR}"); do
if [ -d "${CGAL_TEST_DIR}/\$PACKAGE" ]; then
if source '${LIST_TEST_PACKAGES}' '${CGAL_ROOT}' | egrep -q \$PACKAGE; then
mkdir "\${CGAL_BINARY_DIR}/test/\${PACKAGE}"
cp -r "${CGAL_TEST_DIR}/\${PACKAGE}" '${CGAL_BINARY_DIR}/test'
else
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
touch "${CGAL_BINARY_DIR}/test/\${PACKAGE}/skipped"
fi
fi
done

View File

@ -11,7 +11,7 @@
# GENERATE_TARBALLS=[ON/OFF] indicates if release tarballs should be created as DESTINATION
cmake_minimum_required(VERSION 3.1...3.15)
find_program(BASH NAMES bash sh)
function(process_package pkg)
if(VERBOSE)
message(STATUS "handling ${pkg}")
@ -221,7 +221,7 @@ if (TESTSUITE)
if(IS_DIRECTORY "${release_dir}/test/${d}")
if(NOT EXISTS "${release_dir}/test/${d}/cgal_test_with_cmake")
execute_process(
COMMAND ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
WORKING_DIRECTORY "${release_dir}/test/${d}"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR
@ -247,7 +247,7 @@ if (TESTSUITE)
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Demo")
if(NOT EXISTS "${release_dir}/test/${d}_Demo/cgal_test_with_cmake")
execute_process(
COMMAND ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake --no-run
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake --no-run
WORKING_DIRECTORY "${release_dir}/test/${d}_Demo"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR
@ -268,7 +268,7 @@ if (TESTSUITE)
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Examples")
if(NOT EXISTS "${release_dir}/test/${d}_Examples/cgal_test_with_cmake")
execute_process(
COMMAND ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
WORKING_DIRECTORY "${release_dir}/test/${d}_Examples"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR

View File

@ -246,7 +246,9 @@ run_testsuite()
esac
for DIR in $TEST_DIRECTORIES ; do
test_directory "$DIR"
if [ ! -f $DIR/skipped ]; then
test_directory "$DIR"
fi
done
}