-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Check added ut on windows #31826
Check added ut on windows #31826
Conversation
Thanks for your contribution! |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是在前面--timeout 150 设置了就可以,前面设的是150秒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,
@@ -492,6 +492,12 @@ setlocal enabledelayedexpansion | |||
:: 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% ^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是叫win_cmake.sh更合适些
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,我修改一下
cd $PADDLE_ROOT | ||
echo "=================================" | ||
echo "br-ut" | ||
cat $PADDLE_ROOT/br-ut |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
br-ut的作用是
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个目的是
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是为了保存当前分支的工作进度,我去掉再测试一下有没有影响
@@ -36,6 +36,14 @@ else | |||
disable_ut_quickly='' | |||
fi | |||
|
|||
# check added ut | |||
set +e | |||
cp $PADDLE_ROOT/tools/check_added_ut.sh $PADDLE_ROOT/tools/check_added_ut_win.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个一定需要先cp吗 可以直接执行吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改一下吧
@@ -36,6 +36,14 @@ else | |||
disable_ut_quickly='' | |||
fi | |||
|
|||
# check added ut | |||
set +e | |||
cp $PADDLE_ROOT/tools/check_added_ut.sh $PADDLE_ROOT/tools/check_added_ut_win.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个描述是不是不准确,因为看起来是新增单测失败了,不是超过15S挂了,然后上面还要加个TIMEOUT的新单测限定时间,因为是串行跑的,我建议和Linux限定一样为15S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的描述我改一下吧,加上时间限制的话,我觉得可以适当放宽一下,比如新增单测限制时间为30S,
Linux上的描述我一块改一下,增加"新增单测必须通过额外的三次执行检测"的描述;
PR types
Others
PR changes
Others
Describe
windows任务增加新增单测检查