anod.buildspace
¶
Module Contents¶
Classes¶
Build space located inside a sandbox. |
Attributes¶
- anod.buildspace.logger¶
- class anod.buildspace.BuildSpace(root_dir: str)¶
Build space located inside a sandbox.
- property dirs: list[str]¶
- DIRS = ('binary', 'build', 'install', 'log', 'pkg', 'results', 'src', 'test', 'tmp')¶
- exists() bool ¶
Return True if the build space exists on disk.
This function just checks the contents of self.root_dir, and verifies that it appears to be a build space. It does so, irrespective of whether self.initialize is True or not.
- Returns:
True if self.root_dir is a buildspace, False otherwise.
- subdir(name: str) str ¶
- __getattr__(name: str) str ¶
- __getitem__(key: str) str | None ¶
- create(quiet: bool = False) None ¶
Create a build space.
The function create all the necessary directories and files to have a valid build space. If the build space already exists, only tmp directory content is reset.
- Parameters:
quiet – do not print info messages
- reset(keep: list[str] | None = None) None ¶
Reset build space.
The function delete the complete buildspace. The only elements that are not deleted are the logs, the testsuite results and any subdirectories in keep parameter
A call to self.create() is needed after calling this function.
- Parameters:
keep – a list of directory to keep in addition to results and log. Each element should be part of BuildSpace.DIRS