forked from platformio/platformio-core
Construct build directory based on the build type // Resolve #4373
This commit is contained in:
1 parent
0da1a38df5
commit
b135a73945
14 files changed
+112
-105
No files matched your search
@@ -29,7 +29,7 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes
|
||||
self.project_config = project_config
|
||||
self.env_name = env_name
|
||||
self.env_options = project_config.items(env=env_name, as_dict=True)
|
||||
self.build_data = self._load_build_data()
|
||||
self.build_metadata = self._load_debug_build_metadata()
|
||||
|
||||
self.tool_name = None
|
||||
self.board_config = {}
|
||||
@@ -63,11 +63,11 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes
|
||||
|
||||
@property
|
||||
def program_path(self):
|
||||
return self.build_data["prog_path"]
|
||||
return self.build_metadata["prog_path"]
|
||||
|
||||
@property
|
||||
def client_executable_path(self):
|
||||
return self.build_data["gdb_path"]
|
||||
return self.build_metadata["gdb_path"]
|
||||
|
||||
@property
|
||||
def load_cmds(self):
|
||||
@@ -144,8 +144,14 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes
|
||||
"debug_server_ready_pattern", (self.server or {}).get("ready_pattern")
|
||||
)
|
||||
|
||||
def _load_build_data(self):
|
||||
data = load_build_metadata(os.getcwd(), self.env_name, cache=True, debug=True)
|
||||
def _load_debug_build_metadata(self):
|
||||
data = load_build_metadata(
|
||||
None,
|
||||
self.env_name,
|
||||
cache=True,
|
||||
debug=True,
|
||||
test=self.env_options.get("debug_test", False),
|
||||
)
|
||||
if not data:
|
||||
raise DebugInvalidOptionsError("Could not load a build configuration")
|
||||
return data
|
||||
|
||||
Reference in new issue
Block a user