Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and run unit tests of Paddle #815

Closed
wangkuiyi opened this issue Dec 10, 2016 · 1 comment
Closed

Build and run unit tests of Paddle #815

wangkuiyi opened this issue Dec 10, 2016 · 1 comment
Assignees

Comments

@wangkuiyi
Copy link
Collaborator

wangkuiyi commented Dec 10, 2016

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'
@wangkuiyi wangkuiyi self-assigned this Dec 10, 2016
@luotao1
Copy link
Contributor

luotao1 commented Mar 9, 2018

@luotao1 luotao1 closed this as completed Mar 9, 2018
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this issue Sep 25, 2019
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this issue Sep 25, 2019
WAYKEN-TSE pushed a commit to WAYKEN-TSE/Paddle that referenced this issue Dec 6, 2024
完善inference页面文档,补齐所有方法的推理pipelines和推理脚本,感觉不该是P0的任务,需要补齐的pipelines太多了
@westfish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants