88 lines
2.2 KiB
Markdown
88 lines
2.2 KiB
Markdown
## Ceedling Demo
|
|
---
|
|
To jest projekt testowy.
|
|
|
|
Kroki do wykonania:
|
|
1. W katalogu _Projekty_ uruchamiasz komende:
|
|
```bash
|
|
ceedling new MyProject
|
|
```
|
|
2. Dodajesz **.gitignore** [build/] i **README.md**
|
|
3. Konfiguracja vscode
|
|
|
|
* **c_cpp_properties.json**
|
|
```json
|
|
{
|
|
"configurations": [
|
|
{
|
|
"name": "Linux",
|
|
"includePath": [
|
|
"${workspaceFolder}/**",
|
|
"/var/lib/gems/2.7.0/gems/ceedling-0.30.0/vendor/unity/src/",
|
|
"/var/lib/gems/2.7.0/gems/ceedling-0.30.0/vendor/cmock/src"
|
|
],
|
|
"defines": [],
|
|
"compilerPath": "/usr/bin/gcc",
|
|
"cStandard": "c99",
|
|
"cppStandard": "gnu++14",
|
|
"intelliSenseMode": "gcc-x64"
|
|
}
|
|
],
|
|
"version": 4
|
|
}
|
|
```
|
|
* **launch.json** [Debuger]
|
|
```json
|
|
{
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"name": "Ceedling Test Explorer Debug",
|
|
"type": "cppdbg",
|
|
"request": "launch",
|
|
"program": "${workspaceFolder}/build/test/out/${command:ceedlingExplorer.debugTestExecutable}",
|
|
"args": [],
|
|
"stopAtEntry": false,
|
|
"cwd": "${workspaceFolder}",
|
|
"environment": [],
|
|
"externalConsole": false,
|
|
"MIMode": "gdb",
|
|
"setupCommands": [
|
|
{
|
|
"description": "Enable pretty-printing for gdb",
|
|
"text": "-enable-pretty-printing",
|
|
"ignoreFailures": true
|
|
}
|
|
],
|
|
"miDebuggerPath": "/usr/bin/gdb"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
* **settings.json** _tutaj nazwa musi być taka sama jak w launch.json_
|
|
```json
|
|
{
|
|
"ceedlingExplorer.debugConfiguration": "Ceedling Test Explorer Debug"
|
|
}
|
|
```
|
|
* **project.yml** [xml_tests_report dodać]
|
|
```
|
|
:plugins:
|
|
:load_paths:
|
|
- "#{Ceedling.load_path}"
|
|
:enabled:
|
|
- stdout_pretty_tests_report
|
|
- module_generator
|
|
- xml_tests_report
|
|
```
|
|
4. Dodać **Makfile**
|
|
5. git
|
|
```bash
|
|
git add .
|
|
git commit -m "init commit"
|
|
git remote add gitea <url>
|
|
git push gitea master
|
|
git checkout -b new_feature
|
|
```
|
|
|
|
Powinno być gotowe do pracy |