#!/bin/bash eval "$(conda shell.bash hook)" conda activate test_common1 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Define the target directory TARGET_DIR="${SCRIPT_DIR}/ARC" # Copy files to target directory # These files are presumably coming from the parent directory and need to be placed in the test environment cp "${SCRIPT_DIR}/canonical.py" "${TARGET_DIR}/." cp "${SCRIPT_DIR}/test.py" "${TARGET_DIR}/." # Change to target directory and run the script cd "${TARGET_DIR}" || exit PYTHONPATH="${TARGET_DIR}" pytest --timeout=10 test.py --junitxml="${SCRIPT_DIR}/pytest_report/report.xml" \ --cov="canonical" --cov-report=json:"${SCRIPT_DIR}/jsoncov" # Clean up copied files and the file we created rm "${TARGET_DIR}/canonical.py" rm "${TARGET_DIR}/test.py"