You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to add the following stuff to Docker-related documents, or maybe a How to Develop and Test guide.
How to build and run tests
Paddle uses cmake as the build system. Usually, we run cmake and make from without a directory other than the source code directory paddle, but somewhere like paddle/build. After building, we can run ctest from within the same directory for tests.
For detailed messages on failure
ctest suppresses detailed outputs by default. This fits the cases of CI, but not for development, where we would like to see detailed outputs. To do so, we can set the environment variable CTEST_OUTPUT_ON_FAILURE to 1:
CTEST_OUTPUT_ON_FAILURE=1 ctest
No cmake install before running tests
In our Dockerfiles, we have RUN make install which installs the built Python libraries of Paddle. But some of our tests require a clean Python environment. When we see error messages like the following, we just need to run pip uninstall paddle and re-run tests.
38/56 Test #38: test_RecurrentGradientMachine .......***Failed 0.02 sec
paddle package is already in your PYTHONPATH. But unittest need a clean environment.
Please uninstall paddle package before start unittest. Try to 'pip uninstall paddle'
Start 39: test_NetworkCompare
39/56 Test #39: test_NetworkCompare .................***Failed 0.02 sec
paddle package is already in your PYTHONPATH. But unittest need a clean environment.
Please uninstall paddle package before start unittest. Try to 'pip uninstall paddle'
Start 40: test_PyDataProvider2
40/56 Test #40: test_PyDataProvider2 ................***Failed 0.02 sec
paddle package is already in your PYTHONPATH. But unittest need a clean environment.
Please uninstall paddle package before start unittest. Try to 'pip uninstall paddle'
The text was updated successfully, but these errors were encountered:
I need to add the following stuff to Docker-related documents, or maybe a How to Develop and Test guide.
How to build and run tests
Paddle uses cmake as the build system. Usually, we run
cmake
andmake
from without a directory other than the source code directorypaddle
, but somewhere likepaddle/build
. After building, we can runctest
from within the same directory for tests.For detailed messages on failure
ctest
suppresses detailed outputs by default. This fits the cases of CI, but not for development, where we would like to see detailed outputs. To do so, we can set the environment variableCTEST_OUTPUT_ON_FAILURE
to 1:No
cmake install
before running testsIn our Dockerfiles, we have
RUN make install
which installs the built Python libraries of Paddle. But some of our tests require a clean Python environment. When we see error messages like the following, we just need to runpip uninstall paddle
and re-run tests.The text was updated successfully, but these errors were encountered: