MindStudio Debugger Development Environment Setup, Build, and UT Methods
1. Background Knowledge Required
For details about the code framework and core process, see the msDebug Architecture Design Specifications.
2. Development Environment Setup
Set up the environment by referring to the Operator Tool Development Environment Setup Guide.
3. Building and Packaging
There are two methods, each with its own advantages and disadvantages:
| Method | Application Scenario | Advantages | Disadvantages |
|---|---|---|---|
| One-click script | Initial build and CI/CD pipeline | Zero configuration, one-step setup | Steps cannot be executed independently. |
| Step-by-step script | Routine development and incremental build | Flexibility and efficiency | Multiple steps are required. |
3.1 Method 1: One-click Script
python build.py
3.2 Method 2: Step-by-Step Script
3.2.1 Downloading Dependencies
python download_dependencies.py
3.2.2 Building and Packaging
3.2.2.1 Starting Build
Run the following commands to start the build:
mkdir build
cd build
cmake -G Ninja .. && ninja
If the generation time of the mindstudio-debugger_<version>_<arch>.run --run file in the output directory is updated to the current build time, the building and packaging are successful.
3.2.2.2 Build Result Description
The build result is generated in the output directory:
output/
|-- mindstudio-debugger_<version>_<arch>.run --run # Installation package
|-- bin # Executable bin file, which can directly call the debugging function
|-- lib64 # Various dynamic and static libraries
|-- scene.info # Environment information
|-- version.info # Version information
3.2.3 Cleanup/Rebuild
Delete the build directory and perform 3.2.2.1.
rm -rf build
4. Running UT
python build.py test
5. FAQ
5.1 Why Is No .run Package Generated When I Run the make Command During Building?
It is possible that cmake .. is used when running the cmake command. The cmake command is described as follows:
cmake ..: Only the current project is built. Themake installcommand installs the project to theoutput/directory, but does not callmakeself. Therefore, noAscend-mindstudio-sanitizer-xxx .runfile is generated.cmake ../cmake: The "super build" ofcmake/CMakeLists.txtis used. The project is built and installed first, and thenparser.pyandmakeselfare executed to generate the .run file in theoutput/directory.