CCF/tests/tests.sh

39 строки
871 B
Bash
Исходник Обычный вид История

#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
set -e
2020-10-06 18:44:53 +03:00
echo "Setting up Python environment..."
if [ ! -f "env/bin/activate" ]
then
2020-09-11 18:33:09 +03:00
python3.8 -m venv env
fi
source env/bin/activate
2021-09-02 17:35:27 +03:00
pip install -U -q pip
pip install -q -U -e ../python/
pip install -q -U -r ../tests/requirements.txt
2020-10-06 18:44:53 +03:00
echo "Python environment successfully setup"
# We can delete it when
# lldb is included in the CI images
if ! command -v lldb; then
SUDO=""
if [ "$EUID" != 0 ]; then
SUDO="sudo"
fi
$SUDO apt update
$SUDO apt install -y lldb
fi
2020-10-28 21:46:35 +03:00
# Export where the VENV has been set, so tests running
# a sandbox.sh can inherit it rather create a new one
VENV_DIR=$(realpath env)
export VENV_DIR="$VENV_DIR"
2021-09-07 11:23:16 +03:00
# Enable https://github.com/Qix-/better-exceptions
export BETTER_EXCEPTIONS=1
ctest "$@"