From 997e091dc3133be8570624e75fd690c09d662b6b Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Mon, 19 Jul 2021 14:04:29 +0800 Subject: [PATCH] Fix npu test approval (#34210) * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * notest;test=approval * del test py --- tools/check_file_diff_approvals.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 7324b7a6c13..73201b364c3 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -200,7 +200,8 @@ if [ ${HAS_DEFINE_FLAG} ] && [ "${GIT_PR_ID}" != "" ]; then check_approval 1 47554610 fi -HAS_UNITTEST_SKIP=`git diff -U0 upstream/$BRANCH | grep "^+[[:space:]]\{0,\}@unittest.skip" || true` +NO_NPU_FILE=`git diff --name-only upstream/$BRANCH | grep -v "_npu.py"` +HAS_UNITTEST_SKIP=`git diff -U0 upstream/$BRANCH ${NO_NPU_FILE} | grep "^+[[:space:]]\{0,\}@unittest.skip" || true` if [ "${HAS_UNITTEST_SKIP}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then echo_line="Unittest is not allowed to be disabled.\nYou must have one RD (kolinwei(Recommend), wanghuancoder or luotao1) approval for the usage of @unittest.skip or @unittest.skipIf.\n${HAS_UNITTEST_SKIP}\n" check_approval 1 22165420 6836917 46661762 26922892 -- GitLab