configuration.clang_module_cache_dir = os.path.join(
configuration.test_build_dir, 'module-cache-clang')
- os.environ['CLANG_MODULE_CACHE_DIR'] = configuration.clang_module_cache_dir
-
if args.lldb_libs_dir:
configuration.lldb_libs_dir = args.lldb_libs_dir
os.environ["LLDB_TEST_SRC"] = lldbsuite.lldb_test_root
# Set up the root build directory.
- builddir = configuration.test_build_dir
if not configuration.test_build_dir:
raise Exception("test_build_dir is not set")
os.environ["LLDB_BUILD"] = os.path.abspath(configuration.test_build_dir)
print("compiler=%s" % configuration.compiler)
# Iterating over all possible architecture and compiler combinations.
- os.environ["ARCH"] = configuration.arch
- os.environ["CC"] = configuration.compiler
configString = "arch=%s compiler=%s" % (configuration.arch,
configuration.compiler)
# Our imports
import lldbsuite.test.lldbtest as lldbtest
import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import configuration
from lldbsuite.test_event import build_exception
def getArchitecture():
"""Returns the architecture in effect the test suite is running with."""
- return os.environ["ARCH"] if "ARCH" in os.environ else ""
+ return configuration.arch if configuration.arch else ""
def getCompiler():
"""Returns the compiler in effect the test suite is running with."""
- compiler = os.environ.get("CC", "clang")
+ compiler = configuration.compiler if configuration.compiler else "clang"
compiler = lldbutil.which(compiler)
return os.path.realpath(compiler)
used for the make system.
"""
arch = architecture if architecture else None
- if not arch and "ARCH" in os.environ:
- arch = os.environ["ARCH"]
+ if not arch and configuration.arch:
+ arch = configuration.arch
return ("ARCH=" + arch) if arch else ""
used for the make system.
"""
cc = compiler if compiler else None
- if not cc and "CC" in os.environ:
- cc = os.environ["CC"]
+ if not cc and configuration.compiler:
+ cc = configuration.compiler
if cc:
return "CC=\"%s\"" % cc
else:
Helper function to return the key-value string to specify the clang
module cache used for the make system.
"""
- if "CLANG_MODULE_CACHE_DIR" in os.environ:
+ if configuration.clang_module_cache_dir:
return "CLANG_MODULE_CACHE_DIR={}".format(
- os.environ["CLANG_MODULE_CACHE_DIR"])
+ configuration.clang_module_cache_dir)
return "";
def getCmdLine(d):