main.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Tencent is pleased to support the open source community by making wwsearch
  3. * available.
  4. *
  5. * Copyright (C) 2018-present Tencent. All Rights Reserved.
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  8. * use this file except in compliance with the License. You may obtain a copy of
  9. * the License at
  10. *
  11. * https://opensource.org/licenses/Apache-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. * WARRANTIES OF ANY KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations under the License.
  17. */
  18. #include <gtest/gtest.h>
  19. #include "include/search_util.h"
  20. bool g_debug = false;
  21. bool g_use_rocksdb = false;
  22. bool g_use_compression = false;
  23. int main(int argc, char **argv) {
  24. wwsearch::ArgsHelper helper(
  25. argc, argv, "a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:");
  26. if (1 == helper.Int('r')) {
  27. g_use_rocksdb = true;
  28. }
  29. if (1 == helper.Int('d')) {
  30. printf("open debug \n ");
  31. g_debug = true;
  32. }
  33. if (1 == helper.Int('p')) {
  34. g_use_compression = true;
  35. }
  36. testing::InitGoogleTest(&argc, argv);
  37. auto ret = RUN_ALL_TESTS();
  38. return ret;
  39. }