Repository navigation
Conversation
Now that #44795 has landed, we can convert the bulk of our cpp tests to use gtest APIs. Eventually we'll want to get rid of our weird harness for cpp tests entirely in favor of using regular gtest everywhere. This PR demonstrates some of the benefits of this approach: 1. You don't need to register your test twice (once to define it, once in tests.h). 2. Consequently, it's easier to have many individual test cases. Failures can be reported independently (rather than having huge functions to test entire modules. 3. Some nicer testing APIs, notably test fixtures. [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 5bef589 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 15 times. |
Now that #44795 has landed, we can convert the bulk of our cpp tests to use gtest APIs. Eventually we'll want to get rid of our weird harness for cpp tests entirely in favor of using regular gtest everywhere. This PR demonstrates some of the benefits of this approach: 1. You don't need to register your test twice (once to define it, once in tests.h). 2. Consequently, it's easier to have many individual test cases. Failures can be reported independently (rather than having huge functions to test entire modules. 3. Some nicer testing APIs, notably test fixtures. [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 19, 2020
See #45018 for context. [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 19, 2020
See #45018 for context. [ghstack-poisoned]
Now that #44795 has landed, we can convert the bulk of our cpp tests to use gtest APIs. Eventually we'll want to get rid of our weird harness for cpp tests entirely in favor of using regular gtest everywhere. This PR demonstrates some of the benefits of this approach: 1. You don't need to register your test twice (once to define it, once in tests.h). 2. Consequently, it's easier to have many individual test cases. Failures can be reported independently (rather than having huge functions to test entire modules. 3. Some nicer testing APIs, notably test fixtures. Differential Revision: [D23802297](https://our.internmc.facebook.com/intern/diff/D23802297) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 19, 2020
See #45018 for context. Differential Revision: [D23802298](https://our.internmc.facebook.com/intern/diff/D23802298) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 19, 2020
See #45018 for context. Differential Revision: [D23802296](https://our.internmc.facebook.com/intern/diff/D23802296) [ghstack-poisoned]
Codecov Report
@@ Coverage Diff @@
## gh/suo/355/base #45018 +/- ##
===================================================
- Coverage 67.84% 67.84% -0.01%
===================================================
Files 384 384
Lines 49984 49984
===================================================
- Hits 33912 33911 -1
- Misses 16072 16073 +1
Continue to review full report at Codecov.
|
Now that #44795 has landed, we can convert the bulk of our cpp tests to use gtest APIs. Eventually we'll want to get rid of our weird harness for cpp tests entirely in favor of using regular gtest everywhere. This PR demonstrates some of the benefits of this approach: 1. You don't need to register your test twice (once to define it, once in tests.h). 2. Consequently, it's easier to have many individual test cases. Failures can be reported independently (rather than having huge functions to test entire modules. 3. Some nicer testing APIs, notably test fixtures. Differential Revision: [D23802297](https://our.internmc.facebook.com/intern/diff/D23802297) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. Differential Revision: [D23802298](https://our.internmc.facebook.com/intern/diff/D23802298) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. Differential Revision: [D23802296](https://our.internmc.facebook.com/intern/diff/D23802296) [ghstack-poisoned]
Now that #44795 has landed, we can convert the bulk of our cpp tests to use gtest APIs. Eventually we'll want to get rid of our weird harness for cpp tests entirely in favor of using regular gtest everywhere. This PR demonstrates some of the benefits of this approach: 1. You don't need to register your test twice (once to define it, once in tests.h). 2. Consequently, it's easier to have many individual test cases. Failures can be reported independently (rather than having huge functions to test entire modules. 3. Some nicer testing APIs, notably test fixtures. Differential Revision: [D23802297](https://our.internmc.facebook.com/intern/diff/D23802297) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. Differential Revision: [D23802298](https://our.internmc.facebook.com/intern/diff/D23802298) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. Differential Revision: [D23802296](https://our.internmc.facebook.com/intern/diff/D23802296) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. Differential Revision: [D23802296](https://our.internmc.facebook.com/intern/diff/D23802296) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 21, 2020
See #45018 for context. Differential Revision: [D23811085](https://our.internmc.facebook.com/intern/diff/D23811085) [ghstack-poisoned]
ZolotukhinM
approved these changes
Sep 21, 2020
ZolotukhinM
left a comment
There was a problem hiding this comment.
Looks good (I assumed that all tests are preserved and didn't check that)!
| set(JIT_TEST_SRCS ${JIT_TEST_SRCS} PARENT_SCOPE) | ||
|
|
||
| add_executable(test_jit | ||
| ${TORCH_ROOT}/test/cpp/common/main.cpp |
There was a problem hiding this comment.
Why don't we include main.cpp into JIT_TEST_SRCS?
Contributor
facebook-github-bot
pushed a commit
that referenced
this pull request
Sep 23, 2020
facebook-github-bot
pushed a commit
that referenced
this pull request
Sep 23, 2020
facebook-github-bot
pushed a commit
that referenced
this pull request
Sep 23, 2020
suo
added a commit
that referenced
this pull request
Sep 24, 2020
suo
added a commit
that referenced
this pull request
Sep 24, 2020
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 24, 2020
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 24, 2020
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 24, 2020
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 25, 2020
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
suo
added a commit
that referenced
this pull request
Sep 25, 2020
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
facebook-github-bot
pushed a commit
that referenced
this pull request
Sep 25, 2020
Summary: Pull Request resolved: #45264 Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Test Plan: Imported from OSS Reviewed By: ZolotukhinM Differential Revision: D23901392 Pulled By: suo fbshipit-source-id: 89526890e1a49462f3f77718f4ee273c5bc578ba
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Now that #44795 has landed, we
can convert the bulk of our cpp tests to use gtest APIs. Eventually
we'll want to get rid of our weird harness for cpp tests entirely in
favor of using regular gtest everywhere. This PR demonstrates some of
the benefits of this approach:
in tests.h).
Failures can be reported independently (rather than having huge
functions to test entire modules.
Differential Revision: D23802297