96df5442bc
Split header tests accordingly i.e. test core headers as part of
core tests, numeric extension headers as part of numeric tests, etc.
It extends the convention of sub-directories already established in
`include/boost/gil` directory. It is sensible to follow it in other
areas of the source tree (i.e. `test/`, `doc/` and `benchmark/`).
Another important reason to move the tests is to enable removal of
the top-level `Jamfile` with all its definitions of test-specific
requirements.
The top-level `Jamfile` is not advised, especially if it specifies
build requirements like C++ language version.
Those affect non-tests builds e.g. documentation, causing failures
during generation of HTML documentation (leads to missing docs).
(cherry picked from develop branch commit 4ed7701b47
)
45 lines
1.3 KiB
Bash
Executable File
45 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Boost.GIL proxy for b2 command on Travis CI (can run locally too)
|
|
set -eu
|
|
|
|
if [ ! -z ${TRAVIS+x} ] && [ "$TRAVIS" == "true" ] && [ ! -z ${DOC+x} ]; then
|
|
echo "Documentation build requested, skipping tests build"
|
|
exit 0
|
|
fi
|
|
|
|
if [ -z ${TOOLSET+x} ]; then
|
|
echo "Missing environment TOOLSET"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z ${VARIANT+x} ]; then
|
|
echo "Missing environment VARIANT"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z ${CXXSTD+x} ]; then
|
|
CXXSTD=11
|
|
fi
|
|
|
|
if [ -z ${B2_OPTIONS+x} ]; then
|
|
B2_OPTIONS=""
|
|
fi
|
|
|
|
if [ ! -z ${TRAVIS+x} ] && [ "$TRAVIS" == "true" ]; then
|
|
JOBS="2"
|
|
elif [[ $(uname -s) == "Linux" ]]; then
|
|
JOBS=$(lscpu -p | grep -v '^#' | sort -u -t, -k 2,4 | wc -l)
|
|
elif [[ $(uname) == "Darwin" ]]; then
|
|
JOBS=$(sysctl -n hw.physicalcpu)
|
|
else
|
|
JOBS=1
|
|
fi
|
|
|
|
echo "Running ./b2 -j $JOBS $B2_OPTIONS toolset=$TOOLSET variant=$VARIANT"
|
|
|
|
set -euv
|
|
./b2 -j $JOBS $B2_OPTIONS toolset=$TOOLSET variant=$VARIANT cxxstd=$CXXSTD libs/gil/test/core
|
|
./b2 -j $JOBS $B2_OPTIONS toolset=$TOOLSET variant=$VARIANT cxxstd=$CXXSTD libs/gil/test/extension/numeric
|
|
./b2 -j $JOBS $B2_OPTIONS toolset=$TOOLSET variant=$VARIANT cxxstd=$CXXSTD libs/gil/test/extension/toolbox
|
|
./b2 -j $JOBS $B2_OPTIONS toolset=$TOOLSET variant=$VARIANT cxxstd=$CXXSTD libs/gil/test/extension/io//simple
|