-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring Unit Tests into a Test Free Function and a Standalone/Native Driver #644
Merged
woody-apple
merged 30 commits into
project-chip:master
from
gerickson:user/gerickson/unit-test-refactor-prototype
May 12, 2020
Merged
Refactoring Unit Tests into a Test Free Function and a Standalone/Native Driver #644
woody-apple
merged 30 commits into
project-chip:master
from
gerickson:user/gerickson/unit-test-refactor-prototype
May 12, 2020
Conversation
This file contains 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
… a 'main()' driver for standalone/native tests.
gerickson
requested review from
anush-apple,
BroderickCarlin,
chrisdecenzo,
hawk248,
jelderton,
robszewczyk,
saurabhst and
woody-apple
as code owners
May 11, 2020 18:50
gerickson
changed the title
Refactoring Unit Tests into a Test Free Function and a Standalone/Native Driver
WIP: Refactoring Unit Tests into a Test Free Function and a Standalone/Native Driver
May 11, 2020
LGTM |
* adding first plugins for chip's application layer zcl implementation * Updated readme.md for inclusion in CHIP repo * updated to conform with formatting required by CHIP and updates to the README.md * removing binaries accidentally added * updated prefixes to CHIP_ZCL, ChipZcl, chipZcl from zap etc... * Added identify cluster server plugin and test * Ignore *.o and *.out. * adding more unit testing with actual generated message dispatch layer * addressed some points about constants, bool check etc... * Added inherited copyrights and other headers with comments * Resolving comments around special values in level-control command handling * Add the attribute db plugin. * Start adding in the attribute database. * Moved some files around, added some more generated files, and beginnings of general message dispatch * Add attribute database. It compiles now, still has few linker problems since the current org of stubs is not what generator expects. * Get to a point where only callbacks are left. * Ok, attribute db now compiles, links and executes a unittest. * Include attribute DB to identify. * Add the generated stubs. * Resolve all linker problems via generated stubs file. * Added testing for message dispatch * Fixing formatting issues * Start tying together the API with the core internal functions. 0. Location of metadata. 1. Proper translation of search records and actual metadata structs. 2. Callback orchestration. * Add a unit test that perform attribute locating. * Some cleanup. * Minor resorting of functions so that the folded view makes more sense. * Remove the masks that define callbacks. That is done completely differently in this case and should not be propagated into CHIP world. * Rename a mis-named "attribute-db" into a "zcl-data-model", since that's what it really is. * Adding beginnings of general command handling, space for interaction with zcl-data-model and codecs Co-authored-by: Timotej Ecimovic <[email protected]>
This reverts commit a3028b696691ce105112a858ee8147f153caf945.
* Add CHIPCounter and PersistedCounter from OpenWeave. CHIPCounter/PersistedCounter is used by weave message layer. Adding this as an independent patch in the interest of keeping pull requests small. Changes from original weave implementation: - Renaming weave to chip (namespaces, constants) - fix includes - update copyright - clean up includes (add required include in header, drop unnecessary includes from cpp file) - Update PersistedCounter unit test files to run (updated includes, changed defines) - Added a TestCHIPCounter unit test. Additional changes: - Created separate InetArgParser h/cpp to remove dependency between support layer and inet layer. This makes the inet layer support inet-specific argument parsing Tested: compilation works and CHIPCounter is included in the support library Tested: PersistedCounter and CHIPCounter unit tests pass in `make check` * Fix order of initialization in persistent counter. Make empty key be templated, to support all platforms. Co-authored-by: Andrei Litvin <[email protected]>
… a 'main()' driver for standalone/native tests.
…com:gerickson/connectedhomeip into user/gerickson/unit-test-refactor-prototype
jelderton
approved these changes
May 12, 2020
saurabhst
approved these changes
May 12, 2020
This was referenced May 28, 2020
Merged
mkardous-silabs
pushed a commit
to mkardous-silabs/connectedhomeip
that referenced
this pull request
May 2, 2023
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
shgutte
pushed a commit
to shgutte/connectedhomeip
that referenced
this pull request
Oct 5, 2023
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
shgutte
pushed a commit
to shgutte/connectedhomeip
that referenced
this pull request
Jan 11, 2024
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
mkardous-silabs
pushed a commit
to mkardous-silabs/connectedhomeip
that referenced
this pull request
Jan 29, 2024
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
mkardous-silabs
pushed a commit
to mkardous-silabs/connectedhomeip
that referenced
this pull request
Jan 29, 2024
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
rcasallas-silabs
pushed a commit
to rcasallas-silabs/connectedhomeip
that referenced
this pull request
Jun 20, 2024
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
rcasallas-silabs
pushed a commit
to rcasallas-silabs/connectedhomeip
that referenced
this pull request
Jun 20, 2024
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
chirag-silabs
pushed a commit
to rosahay-silabs/connectedhomeip
that referenced
this pull request
Jul 15, 2024
Merge in WMN_TOOLS/matter from unify_codeowners to silabs Squashed commit of the following: commit 95bc78bd6813c79be10a5a968c80ff9aae4d18e6 Author: Milind Dumbare <[email protected]> Date: Mon Mar 13 12:51:25 2023 +0100 Update CODEOWNERS for Unify
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.
Problem
Currently, unit tests are only runnable in the context of a standalone/native test driver. There is a desire, however, to run unit tests on an embedded device, potentially one that doesn't support discrete program executables (such as embedded systems).
Refactor the unit test such that the test is a free function, linkable from an archive library and a standalone/native test driver in
main()
.Summary of Changes
This refactors the unit tests into separable test functions and drivers.