Skip to content

Commit

Permalink
skip cpp test (#63189)
Browse files Browse the repository at this point in the history
* skip cpp test

* Fix coverage test

* Fix coverage test

* Fix coverage test

* pip

* fix pip

* Fix uninstall

* Fix

* Fix cpp test
  • Loading branch information
tianshuo78520a authored Apr 24, 2024
1 parent dbe93b5 commit 4e6e92d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paddle/scripts/paddle_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ cd /d %work_dir%\%BUILD_DIR%
rem whether to run cpp test
python -m pip install github
python -m pip install PyGithub
python %work_dir%\tools\windows\check_only_change_python_files.py
python %work_dir%\tools\check_only_change_python_files.py
if exist %work_dir%\%BUILD_DIR%\only_change_python_file.txt set WITH_CPP_TEST=OFF
echo WITH_CPP_TEST: %WITH_CPP_TEST%
echo cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=Release -DWITH_AVX=%WITH_AVX% -DWITH_GPU=%WITH_GPU% -DWITH_MKL=%WITH_MKL% ^
Expand Down
13 changes: 13 additions & 0 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ function cmake_base() {
-DWITH_PYTHON=${WITH_PYTHON:-ON}
-DCUDNN_ROOT=/usr/
-DWITH_TESTING=${WITH_TESTING:-ON}
-DWITH_CPP_TEST=${WITH_CPP_TEST:-ON}
-DWITH_COVERAGE=${WITH_COVERAGE:-OFF}
-DWITH_INCREMENTAL_COVERAGE=${WITH_INCREMENTAL_COVERAGE:-OFF}
-DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake
Expand Down Expand Up @@ -288,6 +289,7 @@ EOF
-DWITH_PYTHON=${WITH_PYTHON:-ON} \
-DCUDNN_ROOT=/usr/ \
-DWITH_TESTING=${WITH_TESTING:-ON} \
-DWITH_CPP_TEST=${WITH_CPP_TEST:-ON} \
-DWITH_COVERAGE=${WITH_COVERAGE:-OFF} \
-DWITH_INCREMENTAL_COVERAGE=${WITH_INCREMENTAL_COVERAGE:-OFF} \
-DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake \
Expand Down Expand Up @@ -3835,6 +3837,15 @@ function run_setup(){
INFERENCE_DEMO_INSTALL_DIR=${INFERENCE_DEMO_INSTALL_DIR:-/root/.cache/inference_demo}
fi

pip uninstall -y PyGithub
pip install github
pip install PyGithub
python ${PADDLE_ROOT}/tools/check_only_change_python_files.py
if [ -f "${PADDLE_ROOT}/build/only_change_python_file.txt" ];then
export WITH_CPP_TEST=OFF
else
export WITH_CPP_TEST=ON
fi
distibuted_flag=${WITH_DISTRIBUTE:-OFF}
gloo_flag=${distibuted_flag}
pscore_flag=${distibuted_flag}
Expand Down Expand Up @@ -3904,6 +3915,8 @@ EOF
export WITH_CUDNN_FRONTEND=${WITH_CUDNN_FRONTEND:-OFF}
export WITH_SHARED_PHI=${WITH_SHARED_PHI:-OFF}
export WITH_NVCC_LAZY=${WITH_NVCC_LAZY:-ON}
export WITH_CPP_TEST=${WITH_CPP_TEST:-ON}


if [ "$SYSTEM" == "Linux" ];then
if [ `nproc` -gt 16 ];then
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(WIN32 AND NOT WITH_CPP_TEST)
if(NOT WITH_CPP_TEST)
return()
endif()
add_subdirectory(auto_parallel)
Expand Down
File renamed without changes.

0 comments on commit 4e6e92d

Please sign in to comment.