From e8e8c9049960d3a1ef48b80a65d8282b455ba621 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Mon, 13 Jul 2015 16:42:40 -0700 Subject: [PATCH] fix compile for optimistic_transaction_test under ROCKSDB_LITE Summary: Adding a main for optimistic_transaction_test that report that it was skipped when using ROCKSDB_LITE Test Plan: optimistic_transaction_test Reviewers: yhchiang, sdong, igor, anthony Reviewed By: anthony Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D41979 --- .../transactions/optimistic_transaction_test.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/utilities/transactions/optimistic_transaction_test.cc b/utilities/transactions/optimistic_transaction_test.cc index b44f07ca8..b610a9ba8 100644 --- a/utilities/transactions/optimistic_transaction_test.cc +++ b/utilities/transactions/optimistic_transaction_test.cc @@ -843,4 +843,14 @@ int main(int argc, char** argv) { return RUN_ALL_TESTS(); } -#endif // ROCKSDB_LITE +#else +#include + +int main(int argc, char** argv) { + fprintf( + stderr, + "SKIPPED as optimistic_transaction is not supported in ROCKSDB_LITE\n"); + return 0; +} + +#endif // !ROCKSDB_LITE