<commit_before>#!/bin/bash -e
# Builds and tests PDAL
source ./scripts/ci/common.sh

mkdir -p _build || exit 1
cd _build || exit 1

case "$PDAL_OPTIONAL_COMPONENTS" in
    all)
        OPTIONAL_COMPONENT_SWITCH=ON
        ;;
    none)
        OPTIONAL_COMPONENT_SWITCH=OFF
        ;;
    *)
        echo "Unrecognized value for PDAL_OPTIONAL_COMPONENTS=$PDAL_OPTIONAL_COMPONENTS"
        exit 1
esac

if [[ "$CXX" == "g++" ]]
then
    export CXX="g++-4.8"
fi

cmake \
    -DBUILD_PLUGIN_ICEBRIDGE=OFF \
    -DBUILD_PLUGIN_NITF=OFF \
    -DBUILD_PLUGIN_OCI=OFF \
    -DBUILD_PLUGIN_PGPOINTCLOUD=OFF\
    -DBUILD_PLUGIN_SQLITE=OFF \
    -DENABLE_CTEST=OFF \
    -DWITH_APPS=ON \
    -DWITH_CARIS=OFF \
    -DWITH_GEOTIFF=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_ICONV=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_LASZIP=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_PKGCONFIG=ON \
    -DWITH_PYTHON=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_TESTS=ON \
    -G "$PDAL_CMAKE_GENERATOR" \
    ..

if [[ $PDAL_CMAKE_GENERATOR == "Unix Makefiles" ]]
then
    MAKECMD=make
else
    MAKECMD=ninja
fi

# Don't use ninja's default number of threads becuase it can
# saturate Travis's available memory.
${MAKECMD} -j ${NUMTHREADS} && \
    LD_LIBRARY_PATH=./lib ./bin/pdal_test "../test/data" "--catch_system_errors=no" && \
    sudo ${MAKECMD} install<commit_msg>try using ctest to run all tests on Travis again<commit_after>#!/bin/bash -e
# Builds and tests PDAL
source ./scripts/ci/common.sh

mkdir -p _build || exit 1
cd _build || exit 1

case "$PDAL_OPTIONAL_COMPONENTS" in
    all)
        OPTIONAL_COMPONENT_SWITCH=ON
        ;;
    none)
        OPTIONAL_COMPONENT_SWITCH=OFF
        ;;
    *)
        echo "Unrecognized value for PDAL_OPTIONAL_COMPONENTS=$PDAL_OPTIONAL_COMPONENTS"
        exit 1
esac

if [[ "$CXX" == "g++" ]]
then
    export CXX="g++-4.8"
fi

cmake \
    -DBUILD_PLUGIN_ICEBRIDGE=OFF \
    -DBUILD_PLUGIN_NITF=OFF \
    -DBUILD_PLUGIN_OCI=OFF \
    -DBUILD_PLUGIN_PGPOINTCLOUD=OFF\
    -DBUILD_PLUGIN_SQLITE=OFF \
    -DENABLE_CTEST=OFF \
    -DWITH_APPS=ON \
    -DWITH_CARIS=OFF \
    -DWITH_GEOTIFF=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_ICONV=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_LASZIP=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_PKGCONFIG=ON \
    -DWITH_PYTHON=$OPTIONAL_COMPONENT_SWITCH \
    -DWITH_TESTS=ON \
    -G "$PDAL_CMAKE_GENERATOR" \
    ..

if [[ $PDAL_CMAKE_GENERATOR == "Unix Makefiles" ]]
then
    MAKECMD=make
else
    MAKECMD=ninja
fi

# Don't use ninja's default number of threads becuase it can
# saturate Travis's available memory.
${MAKECMD} -j ${NUMTHREADS} && \
    LD_LIBRARY_PATH=./lib ctest -V && \
    sudo ${MAKECMD} install
{'fraction_non_alphanumeric': 0.11541353383458647, 'fraction_numerical': 0.0037593984962406013, 'mean_word_length': 3.013574660633484, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3177823', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1105, 'n_words': 185}