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
Provide a way to build and run unittests on Windows #920
Conversation
| @@ -13,6 +13,9 @@ TEST(CommonFuncs, ArraySizeMacro) | |||
|
|
|||
| EXPECT_EQ(4u, ArraySize(test)); | |||
| EXPECT_EQ(42u, ArraySize(test2)); | |||
|
|
|||
| (void)test; | |||
| (void)test2; | |||
| } | |||
|
|
|||
| TEST(CommonFuncs, RoundUpPow2Macro) | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
@dolphin-emu-bot rebuild |
|
@dolphin-emu-bot rebuild |
|
@dolphin-emu-bot rebuild (let's try again) |
|
@shuffle2 ask to wait until we make the unittest compilation happen only if we want to run tests. |
|
I also experimented with GoogleTest Runner which allows the builtin VS experience for gtest binaries. This will be the best way for developers to run tests locally, apart from using |
|
Can we move the build separation to a following PR? Would also really appreciate some documentation about running tests on Windows, the GTest extension, etc. :) |
Choose it from VS or pass /p:RunUnitTests=true to msbuild
|
@delroth It should be ready to merge now. |
|
BTW for VS users reading this, the easiest way to get the gtest adapter is: |
Provide a way to build and run unittests on Windows
UnitTests have been integrated into msbuild as a standalone project which is compiled by default, but not run. The tests can be run as you would normally run an output binary from VS, or you (or the buildbot) can pass
/p:RunUnitTests=truetomsbuild.Note that the tests are currently failing on windows :)
In order to add more tests, you only add files under UnitTests directory, no modification to the msbuild files should be required.