Skip to content

Commit e35e5bd

Browse files
tests/gunit: disable execution with --gtest_shuffle
Some Google tests rely on being run in a specific order, with certain tests depending on the successful completion of previous ones. Passing the --gtest_shuffle option can break this sequence, potentially leading to test failures or inconsistent results. Until the test suite is updated to support randomized execution, skip running tests when --gtest_shuffle is used. Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
1 parent 86a3718 commit e35e5bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/gunit/gtest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@ int main(int argc, char **argv)
1212
{
1313
::testing::InitGoogleTest(&argc, argv);
1414

15+
if (testing::GTEST_FLAG(shuffle)) {
16+
std::cout << "--gtest_shuffle option is not supported!" <<std::endl;
17+
return 0;
18+
}
1519
return RUN_ALL_TESTS();
1620
}

0 commit comments

Comments
 (0)