MCPcopy Create free account
hub / github.com/apache/mesos / default_mesos_build_dir

Method default_mesos_build_dir

src/python/cli_new/lib/cli/tests/base.py:60–78  ·  view source on GitHub ↗

Returns the default path of the Mesos build directory. Useful when we wish to use some binaries such as mesos-execute.

()

Source from the content-addressed store, hash-verified

58
59 @staticmethod
60 def default_mesos_build_dir():
61 """
62 Returns the default path of the Mesos build directory. Useful when
63 we wish to use some binaries such as mesos-execute.
64 """
65 tests_dir = os.path.dirname(__file__)
66 cli_dir = os.path.dirname(tests_dir)
67 lib_dir = os.path.dirname(cli_dir)
68 cli_new_dir = os.path.dirname(lib_dir)
69 python_dir = os.path.dirname(cli_new_dir)
70 src_dir = os.path.dirname(python_dir)
71 mesos_dir = os.path.dirname(src_dir)
72 build_dir = os.path.join(mesos_dir, "build")
73
74 if os.path.isdir(build_dir):
75 return build_dir
76 raise CLIException("The Mesos build directory"
77 " does not exist: {path}"
78 .format(path=build_dir))
79
80# This value is set to the correct path when running tests/main.py. We
81# set it here to make sure that CLITestCase has a MESOS_BUILD_DIR member.

Callers 1

main.pyFile · 0.80

Calls 3

CLIExceptionClass · 0.90
dirnameMethod · 0.80
joinMethod · 0.65

Tested by

no test coverage detected