API for Projects¶
Part of the Object based program API.
- class ProjectApi¶
API to access projects
Returned by
- ComponentApi¶
Returns the ComponentApi namespace.
- Returns:
ComponentApi namespace
- Return type:
- GetChanges(oldProject, newProject)¶
Get the changes that exist between two given projects.
-
OpenProject(filename, execInCurrentPkgDir=
False, filterExpression='')¶ Opens an existing project. The project may not be opened in ecu.test.
- Parameters:
- filename : str¶
Absolute path to the project file or relative path in regard to the package directory
- execInCurrentPkgDir : boolean¶
Whether to treat relative references in the project like the project file “belongs” in the root of the current workspace’s package folder instead of its actual location.
- filterExpression : str¶
A valid project filter expression
- Returns:
Existing project
- Return type:
- OpenProjectFromArchive(filename)¶
Extracts an existing project archive into the current workspace and opens the main project.
-
SearchProjects(searchCriteria, useExtendedMode=
False)¶ Searches the current workspace and library workspaces for projects matching the given search criteria.
- Parameters:
- searchCriteria : str¶
The search criteria expressed in the ecu.test filter syntax. See section “Handling” => “Filter” of the ecu.test User Documentation.
- useExtendedMode : boolean¶
If True, extended search strings are enabled. The default is False, meaning each word in the searchCriteria will be enclosed by wildcards and mapped to the filename. (e.g. “hello world” => “Name = ‘*hello*’ and Name = ‘*world*’”)
- Returns:
All matching projects. If no project matches, an emtpy list is returned.
- Return type:
list[
Project]- Raises:
ApiError – If the searchCriteria has an illegal syntax.