Check added ut on windows #31826
Merged
XieYunshen merged 20 commits intoPaddlePaddle:developfrom Apr 7, 2021
Merged
Conversation
|
Thanks for your contribution! |
zhwesky2010
reviewed
Mar 29, 2021
tools/windows/run_unittests.sh
Outdated
| if [ -f "$PADDLE_ROOT/added_ut" ];then | ||
| added_uts=^$(awk BEGIN{RS=EOF}'{gsub(/\n/,"$|^");print}' $PADDLE_ROOT/added_ut)$ | ||
| ctest -R "(${added_uts})" --output-on-failure -C Release --repeat-until-fail 3 --timeout 150;added_ut_error=$? | ||
| if [ "$added_ut_error" != 0 ];then |
Contributor
There was a problem hiding this comment.
是不是在前面--timeout 150 设置了就可以,前面设的是150秒
| :: if %errorlevel% NEQ 0 exit /b 8 | ||
| :: for /F %%# in ('cmd /C nvidia-smi -L ^|find "GPU" /C') do set CUDA_DEVICE_COUNT=%%# | ||
| set CUDA_DEVICE_COUNT=1 | ||
| echo cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=Release -DWITH_AVX=%WITH_AVX% -DWITH_GPU=%WITH_GPU% -DWITH_MKL=%WITH_MKL% ^ |
| cd $PADDLE_ROOT | ||
| echo "=================================" | ||
| echo "br-ut" | ||
| cat $PADDLE_ROOT/br-ut |
Contributor
Author
There was a problem hiding this comment.
br-ut是为了获取upstream/develop分支上的单测,br-ut和pr-ut对比可以得到新增单测的名称
tools/check_added_ut.sh
Outdated
| if [ `git branch | grep 'prec_added_ut'` ];then | ||
| git branch -D 'prec_added_ut' | ||
| fi | ||
| git stash |
Contributor
Author
There was a problem hiding this comment.
这个是为了保存当前分支的工作进度,我去掉再测试一下有没有影响
|
|
||
| # check added ut | ||
| set +e | ||
| cp $PADDLE_ROOT/tools/check_added_ut.sh $PADDLE_ROOT/tools/check_added_ut_win.sh |
Contributor
Author
zhwesky2010
reviewed
Mar 30, 2021
paddle/scripts/paddle_build.bat
Outdated
| -DWITH_INFERENCE_API_TEST=%WITH_INFERENCE_API_TEST% -DTHIRD_PARTY_PATH=%THIRD_PARTY_PATH% ^ | ||
| -DINFERENCE_DEMO_INSTALL_DIR=%INFERENCE_DEMO_INSTALL_DIR% -DWITH_STATIC_LIB=%WITH_STATIC_LIB% ^ | ||
| -DWITH_TENSORRT=%WITH_TENSORRT% -DTENSORRT_ROOT="%TENSORRT_ROOT%" -DMSVC_STATIC_CRT=%MSVC_STATIC_CRT% ^ | ||
| -DWITH_UNITY_BUILD=%WITH_UNITY_BUILD% -DCUDA_ARCH_NAME=%CUDA_ARCH_NAME% >> %work_dir%\get_added_ut.sh |
|
|
||
| # check added ut | ||
| set +e | ||
| cp $PADDLE_ROOT/tools/check_added_ut.sh $PADDLE_ROOT/tools/check_added_ut_win.sh |
zhwesky2010
reviewed
Mar 31, 2021
tools/windows/run_unittests.sh
Outdated
| ctest -R "(${added_uts})" --output-on-failure -C Release --repeat-until-fail 3;added_ut_error=$? | ||
| if [ "$added_ut_error" != 0 ];then | ||
| echo "========================================" | ||
| echo "Added UT should not exceed 15 seconds" |
Contributor
There was a problem hiding this comment.
这个描述是不是不准确,因为看起来是新增单测失败了,不是超过15S挂了,然后上面还要加个TIMEOUT的新单测限定时间,因为是串行跑的,我建议和Linux限定一样为15S
Contributor
Author
There was a problem hiding this comment.
这里的描述我改一下吧,加上时间限制的话,我觉得可以适当放宽一下,比如新增单测限制时间为30S,
Linux上的描述我一块改一下,增加"新增单测必须通过额外的三次执行检测"的描述;
zhwesky2010
previously approved these changes
Apr 6, 2021
chalsliu
approved these changes
Apr 7, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


PR types
Others
PR changes
Others
Describe
windows任务增加新增单测检查