diff --git a/ci/coverage_test.sh b/ci/coverage_test.sh index bc3d6357877ab8..dfd9abca4fac67 100644 --- a/ci/coverage_test.sh +++ b/ci/coverage_test.sh @@ -31,7 +31,7 @@ function is_run_distribute_in_op_test() { if [ ! -f "$TARGET_FILE" ]; then continue fi - ALL_OPTEST_BAN_AUTO_PARALLEL_TEST=`git diff -U0 upstream/$BRANCH "TARGET_FILE" | grep "+" | grep "check_auto_parallel=" || true` + ALL_OPTEST_BAN_AUTO_PARALLEL_TEST=`git diff -U0 upstream/$BRANCH -- "$TARGET_FILE" | grep "+" | grep "check_auto_parallel=" || true` if [ "${ALL_OPTEST_BAN_AUTO_PARALLEL_TEST}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then export FLAGS_COVERAGE_RUN_AUTO_PARALLEL_IN_OP_TEST=1 echo "export FLAGS_COVERAGE_RUN_AUTO_PARALLEL_IN_OP_TEST=1" >> "$HOME/.bashrc" diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 78f342c23831a0..8ed7773762c229 100644 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -3295,7 +3295,7 @@ function is_run_distribute_in_op_test() { if [ ! -f "$TARGET_FILE" ]; then continue fi - ALL_OPTEST_BAN_AUTO_PARALLEL_TEST=`git diff -U0 upstream/$BRANCH "$TARGET_FILE" | grep "+" | grep "check_auto_parallel=" || true` + ALL_OPTEST_BAN_AUTO_PARALLEL_TEST=`git diff -U0 upstream/$BRANCH -- "$TARGET_FILE" | grep "+" | grep "check_auto_parallel=" || true` if [ "${ALL_OPTEST_BAN_AUTO_PARALLEL_TEST}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then export FLAGS_COVERAGE_RUN_AUTO_PARALLEL_IN_OP_TEST=1 fi