FTorch's test suite is currently comprised of integration tests based on a subset of the examples. These tests are built and run and their outputs are analysed to check they contain expected regular expressions.
To enable FTorch's integration tests, ensure that the CMAKE_BUILD_TESTS
option
is set to TRUE
for the build.
Once the build is complete, activate the Python virtual environment you created for FTorch1 and simply run the helper script in the root FTorch directory:
./run_integration_tests.sh
This will automatically install any additional dependencies for the examples.
1 If you built FTorch against libtorch (rather than creating a virtual environment) then either create a virtual environment for the purposes of testing, or note that this script may have your Python environment install some modules.
Alternatively, individual tests may be run by going to the corresponding
subdirectory of ${BUILD_DIR}/test/examples
(where ${BUILD_DIR}
is the build
directory for FTorch) and calling ctest
. This will produce a report on which
tests passed and which failed for your build. Note that some of the examples
have additional dependencies, which may need installing into your virtual
environment.