Skip to content

Commit

Permalink
Enforce the use of a virtual environment in the integration testing s…
Browse files Browse the repository at this point in the history
…cript.
  • Loading branch information
jatkinson1000 committed Feb 3, 2025
1 parent 08d6da2 commit 783f582
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pages/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ See the subsections below for instructions on how to run subsets of the full
test suite.

> <sup>1</sup> _If you built FTorch against LibTorch (rather than creating a
virtual environment) then either
virtual environment) then you will need to
[create a virtual environment](https://docs.python.org/3/library/venv.html) for
the purposes of testing, or note that this script may have your Python
environment install some modules._
the purposes of integration testing as this script will install packages into your
Python environment and will check that a virtual environment is in use._

#### Running unit tests on Unix

Expand Down
3 changes: 2 additions & 1 deletion run_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ if [ "${RUN_INTEGRATION}" = true ]; then
else
EXAMPLES="1_SimpleNet 2_ResNet18 4_MultiIO 6_Autograd"
fi
export PIP_REQUIRE_VIRTUALENV=true
for EXAMPLE in ${EXAMPLES}; do
pip -q install -r examples/"${EXAMPLE}"/requirements.txt
python -m pip -q install -r examples/"${EXAMPLE}"/requirements.txt
cd "${BUILD_DIR}"/test/examples/"${EXAMPLE}"
ctest "${CTEST_ARGS}"
cd -
Expand Down

0 comments on commit 783f582

Please sign in to comment.