from __future__ import print_function
from __future__ import unicode_literals
from targets_builder import TARGETSBuilder
-from optparse import OptionParser
import os
import fnmatch
import sys
-import tempfile
from util import ColorString
-import util
# tests to export as libraries for inclusion in other projects
_EXPORTED_TEST_LIBS = ["env_basic_test"]
# get all .cc / .c files
def get_cc_files(repo_path):
cc_files = []
- for root, dirnames, filenames in os.walk(repo_path):
+ for root, dirnames, filenames in os.walk(repo_path): # noqa: B007 T25377293 Grandfathered in
root = root[(len(repo_path) + 1):]
if "java" in root:
# Skip java
else:
# we consumed all the parallel tests
break
-
+
return tests
"rocksdb_test_lib",
src_mk.get("MOCK_LIB_SOURCES", []) +
src_mk.get("TEST_LIB_SOURCES", []) +
- src_mk.get("EXP_LIB_SOURCES", []),
+ src_mk.get("EXP_LIB_SOURCES", []) +
+ src_mk.get("ANALYZER_LIB_SOURCES", []),
[":rocksdb_lib"])
# rocksdb_tools_lib
TARGETS.add_library(
"rocksdb_tools_lib",
src_mk.get("BENCH_LIB_SOURCES", []) +
+ src_mk.get("ANALYZER_LIB_SOURCES", []) +
["util/testutil.cc"],
[":rocksdb_lib"])
# test for every test we found in the Makefile
- for test in tests:
+ for test in sorted(tests):
match_src = [src for src in cc_files if ("/%s.c" % test) in src]
if len(match_src) == 0:
print(ColorString.warning("Cannot find .cc file for %s" % test))