-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Deleting unit test is forbidden (English Version)
Summary:
- Section 1: Instructions
- Section 2: The inspection method of this specification
- Section 3: Methods if inspection is failed
supplementary instruction:
The unit-test in Temporarily disabled UnitTest are needed to confirm the reasons for the failure, futherly. For those that can be solved by modifying the OP code, corresponding modifications should be made.
-
Some op have bugs, which are easy to fail in unit test. For various reasons, the bug has not been fixed but just removed the unit test, which is not allowed。
-
Requirements: the number of unit tests is not allowed to decrease, only to increase.
-
Therefore, in order to protect the existing unit tests and gradually improve the coverage of unit tests, this Specification is proposed, and the corresponding detection mechanism is set on CI.
-
PR_CI_Coverage
MAC_PR_CI_python35
wilee checks approval firstly, and if there is an approval from the specified person (the corresponding approver will be prompted in CI), the check will be automatically exempted; -
If there is no approval, CI begins to check the current PR: cmake, build, and run unit-tests in order;
-
Gets names of all unit tests for the current PR;
-
Gets names of all unit tests for develop branch in PaddlePaddle repository;
-
Compare unit test of the two versions. Intercept if the number of unit tests decreases;
-
Only unit test that fail to run (see step 2) can be added to Temporarily disabled UnitTest, and you should provide sufficient reason;
-
If one unit test is added to Temporarily disabled UnitTest and get approval from specified person, please do not resubmit the code again, just rerun CI directly to trigger the exemption check。
This specification is currently enabled in PR_CI_Coverage
MAC_PR_CI_python35
. Existing diabled unit-tests have been added to Temporarily disabled UnitTest. Disabling the unit test will fail to run CI, and these message will appear in build_log:
************************************
It is forbidden to disable or delete the unit-test.
If you must delete it temporarily, please add it to [https://github.com/PaddlePaddle/Paddle/wiki/Temporarily-disabled-Unit-Test]
Then you must have one RD (kolinwei(recommended) or zhouwei25 or luotao1) approval for the deletion of unit-test.
If you have any problems about deleting unit-test, please read the specification [https://github.com/PaddlePaddle/Paddle/wiki/Deleting-unit-test-is-forbidden].
Following unit-tests are deleted in this PR:
test_1
test_2
test_3
...
test_n
************************************
- The corresponding solutions are as follows:
-
In principle, unit-test is not allowed to be disabled. Please modify the OP code by yourself until the unit test passes;
-
For those can't be repaired in short term and must be disabled, please be sure to add it to Temporarily disabled UnitTest firstly.
-
Ask for the approval of the specified person (the corresponding approver will be prompted in CI);
-
After getting approval, please do not resubmit the code again, just re-run CI, CI will be exempted to check this unit-test;
-
Please as soon as possible to repair this unit-test, and remove it from Temporarily disabled UnitTest.
===================================
current pr ${GIT_PR_ID} has got approvals. So, Pass CI directly!
===================================
- Passed!
If you have any other questions, please contact us @zhouwei25。