SIGN IN SIGN UP

Improve cmake testing setup (#3666)

Summary:
* Add build/Test.cmake and provide helper function for users to add tests targets
Example:
```
et_cxx_test(my_test SOURCES my_test.cpp EXTRA_LIBS portable_kernels)
```
User need to invoke et_cxx_test and add their srcs/deps. Note: gtest, gmock, executorch are added to deps by default.
* Update existign CMakeLists.txt and template test/utils/OSSTest.cmake.in for that
* In test/run_oss_cpp_tests.sh, probe tests so user don't need to add them manually We will utilize add_test from cmake later

Pull Request resolved: https://github.com/pytorch/executorch/pull/3666

Test Plan: `sh test/run_oss_cpp_tests.sh`

Reviewed By: dbort

Differential Revision: D57517564

Pulled By: kirklandsign

fbshipit-source-id: 5576c39faa1e95fbd1fa79bb4b31f23d8c182fda
H
Hansong Zhang committed
788676f3099c78983bf9fcaa19526081d2c2db10
Parent: a32e729
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/20/2024, 6:42:14 PM