

set -ex



cmake $CMAKE_ARGS -DPython3_EXECUTABLE=${PYTHON} -DPYTHON_EXECUTABLE=${PYTHON} -DTBB_TEST=ON -DTBB_DIR=TRUE -S . -B test_build
cmake --build test_build --target test_parallel_for test_tbb_header conformance_version test_malloc_compliance test_flow_graph test_arena_constraints --parallel
cd test_build
ctest -R "^(test_parallel_for|test_tbb_header|conformance_version|test_malloc_compliance|test_flow_graph|test_arena_constraints)$" --output-on-failure
exit 0
