Combine RegKeyTests to prevent parallel execution.

Executing these tests in parallel causes failures due to conflicting
registry keys, combining them to unblock launching a parallel win32 bot.
Ideally these keys would be generated differently per-process and not
conflict at all (so it can be run in parallel repeatedly alongside itself).

BUG=4162
R=kjellander@webrtc.org
TBR=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36749004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8055 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2015-01-14 09:03:16 +00:00
parent ef090927f4
commit f7a5893f80

View File

@ -169,7 +169,7 @@ TEST(RegKeyTest, RegKeyHelperFunctionsTest) {
RegKeyHelperFunctionsTest();
}
TEST(RegKeyTest, RegKeyNonStaticFunctionsTest) {
void RegKeyNonStaticFunctionsTest() {
DWORD int_val = 0;
DWORD64 int64_val = 0;
wchar_t* str_val = NULL;
@ -359,7 +359,7 @@ TEST(RegKeyTest, RegKeyNonStaticFunctionsTest) {
EXPECT_SUCCEEDED(RegKey::DeleteKey(kFullRkey1));
}
TEST(RegKeyTest, RegKeyStaticFunctionsTest) {
void RegKeyStaticFunctionsTest() {
DWORD int_val = 0;
DWORD64 int64_val = 0;
float float_val = 0;
@ -587,4 +587,11 @@ TEST(RegKeyTest, RegKeyStaticFunctionsTest) {
EXPECT_SUCCEEDED(RegKey::DeleteKey(kFullRkey1));
}
// Run both tests under the same test target. Because they access (read and
// write) the same registry keys they can't run in parallel with eachother.
TEST(RegKeyTest, RegKeyFunctionsTest) {
RegKeyNonStaticFunctionsTest();
RegKeyStaticFunctionsTest();
}
} // namespace rtc