spl-core 4.1.1__py3-none-any.whl → 4.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spl_core/__init__.py +1 -1
- spl_core/__run.py +12 -0
- spl_core/common/command_line_executor.py +3 -1
- spl_core/kickstart/create.py +66 -0
- spl_core/kickstart/templates/application/.vscode/cmake-variants.json +20 -0
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/application}/KConfig +2 -2
- spl_core/kickstart/templates/application/src/greeter/CMakeLists.txt +3 -0
- spl_core/kickstart/templates/application/src/greeter/doc/_images/screenshot.png +0 -0
- spl_core/kickstart/templates/application/src/greeter/doc/index.rst +26 -0
- spl_core/kickstart/templates/application/src/greeter/src/greeter.c +24 -0
- spl_core/kickstart/templates/application/src/greeter/src/greeter.h +6 -0
- spl_core/kickstart/templates/application/src/greeter/test/test_greeter.cc +27 -0
- spl_core/{project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/main/doc/index.rst → kickstart/templates/application/src/main/doc/index.rst} +6 -2
- spl_core/kickstart/templates/application/src/main/src/main.c +13 -0
- spl_core/kickstart/templates/application/test/EnglishVariant/test__EnglishVariant.py +16 -0
- spl_core/kickstart/templates/application/test/German/test__GermanVariant.py +16 -0
- spl_core/kickstart/templates/application/variants/EnglishVariant/parts.cmake +2 -0
- spl_core/kickstart/templates/application/variants/GermanVariant/config.cmake +1 -0
- spl_core/kickstart/templates/application/variants/GermanVariant/config.txt +13 -0
- spl_core/kickstart/templates/application/variants/GermanVariant/parts.cmake +2 -0
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/.gitignore +3 -0
- spl_core/kickstart/templates/project/.vscode/extensions.json +20 -0
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/.vscode/tasks.json +24 -4
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/CMakeLists.txt +9 -1
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/build.ps1 +47 -17
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/conf.py +8 -6
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/Doxyfile.in +2 -2
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/common/index.rst +1 -1
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/components/index.rst +2 -3
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/doxygen-awesome/doxygen-awesome.css +16 -16
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/test_report_template.txt +0 -2
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/index.rst +1 -0
- spl_core/kickstart/templates/project/pipfile +6 -0
- spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/pytest.ini +2 -1
- spl_core/kickstart/templates/project/scoopfile.json +14 -0
- spl_core/{project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_tools -%} tools {%- endif %}/toolchains/clang/toolchain.cmake → kickstart/templates/project/tools/toolchains/clang/toolchain.cmake} +1 -1
- spl_core/main.py +44 -0
- spl_core/test_utils/base_variant_test_runner.py +17 -0
- spl_core/test_utils/spl_build.py +85 -0
- {spl_core-4.1.1.dist-info → spl_core-4.2.0.dist-info}/METADATA +14 -2
- spl_core-4.2.0.dist-info/RECORD +60 -0
- spl_core/common/cmake.py +0 -52
- spl_core/project_creator/creator.py +0 -133
- spl_core/project_creator/templates/project/cookiecutter.json +0 -14
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/.flake8 +0 -2
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/cmake-variants.json +0 -18
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/extensions.json +0 -18
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/LICENSE +0 -21
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/Pipfile +0 -30
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/README.md +0 -7
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/install-mandatory.bat +0 -1
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/scoopfile.json +0 -47
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/test/test_build.py +0 -39
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/test/test_unittests.py +0 -28
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/test/utils.py +0 -26
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/tools/setup/git-config.ps1 +0 -8
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/CMakeLists.txt +0 -3
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/doc/_images/screenshot.png +0 -0
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/doc/design.rst +0 -25
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/doc/index.rst +0 -8
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/src/component.c +0 -31
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/src/component.h +0 -1
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/test/test_component.cc +0 -60
- spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/main/src/main.c +0 -17
- spl_core/project_creator/templates/variant/cookiecutter.json +0 -4
- spl_core/project_creator/templates/variant/{{cookiecutter.flavor}}/{{cookiecutter.subsystem}}/config.txt +0 -1
- spl_core/project_creator/templates/variant/{{cookiecutter.flavor}}/{{cookiecutter.subsystem}}/parts.cmake +0 -2
- spl_core/project_creator/variant.py +0 -23
- spl_core/project_creator/workspace_artifacts.py +0 -36
- spl_core-4.1.1.dist-info/RECORD +0 -68
- /spl_core/{project_creator → kickstart}/__init__.py +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %} → kickstart/templates/application/src}/main/CMakeLists.txt +0 -0
- /spl_core/{project_creator/templates/variant/{{cookiecutter.flavor}}/{{cookiecutter.subsystem}} → kickstart/templates/application/variants/EnglishVariant}/config.cmake +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/.vscode/cmake-kits.json +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/.vscode/launch.json +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/.vscode/settings.json +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/build.bat +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/doxygen-awesome/LICENSE +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/software_architecture/index.rst +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}} → kickstart/templates/project}/doc/software_requirements/index.rst +0 -0
- /spl_core/{project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_tools -%} tools {%- endif %} → kickstart/templates/project/tools}/toolchains/gcc/toolchain.cmake +0 -0
- {spl_core-4.1.1.dist-info → spl_core-4.2.0.dist-info}/LICENSE +0 -0
- {spl_core-4.1.1.dist-info → spl_core-4.2.0.dist-info}/WHEEL +0 -0
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/cmake-variants.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"variant": {
|
|
3
|
-
"choices": {
|
|
4
|
-
{%- for variant in cookiecutter.variants.values() -%}
|
|
5
|
-
"{{ variant["flavor"] }}/{{ variant["subsystem"] }}": {
|
|
6
|
-
"buildType": "{{ variant["flavor"] }}_{{ variant["subsystem"] }}",
|
|
7
|
-
"long": "select to build variant '{{ variant["flavor"] }}/{{ variant["subsystem"] }}'",
|
|
8
|
-
"settings": {
|
|
9
|
-
"FLAVOR": "{{ variant["flavor"] }}",
|
|
10
|
-
"SUBSYSTEM": "{{ variant["subsystem"] }}"
|
|
11
|
-
},
|
|
12
|
-
"short": "{{ variant["flavor"] }}/{{ variant["subsystem"] }}"
|
|
13
|
-
}{{ ", " if not loop.last else "" }}
|
|
14
|
-
{%- endfor -%}
|
|
15
|
-
},
|
|
16
|
-
"default": "{{ cookiecutter.variants["0"]["flavor"] }}/{{ cookiecutter.variants["0"]["subsystem"] }}"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"recommendations": [
|
|
3
|
-
"mhutchie.git-graph",
|
|
4
|
-
"ms-vscode.cmake-tools",
|
|
5
|
-
"twxs.cmake",
|
|
6
|
-
"ms-vscode.cpptools",
|
|
7
|
-
"ms-vscode.cpptools-themes",
|
|
8
|
-
"visualstudioexptteam.intellicode-api-usage-examples",
|
|
9
|
-
"visualstudioexptteam.vscodeintellicode",
|
|
10
|
-
"haugerbr.project-tasks",
|
|
11
|
-
"avengineers.show-link-list",
|
|
12
|
-
"ms-python.vscode-pylance",
|
|
13
|
-
"ms-python.python",
|
|
14
|
-
"donjayamanne.python-environment-manager",
|
|
15
|
-
"felipecaputo.git-project-manager",
|
|
16
|
-
"ms-vscode.powershell"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 - present Marquardt GmbH and members of AVENGINEERS
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
[[source]]
|
|
2
|
-
url = "https://pypi.org/simple"
|
|
3
|
-
verify_ssl = true
|
|
4
|
-
name = "pypi"
|
|
5
|
-
|
|
6
|
-
[packages]
|
|
7
|
-
spl-core = "*"
|
|
8
|
-
jinja2 = "*"
|
|
9
|
-
pytest = "*"
|
|
10
|
-
pytest-env = "*"
|
|
11
|
-
testfixtures = "*"
|
|
12
|
-
junitparser = "*"
|
|
13
|
-
mashumaro = "*"
|
|
14
|
-
loguru = "*"
|
|
15
|
-
black = "*"
|
|
16
|
-
flake8 = "*"
|
|
17
|
-
sphinx = "*"
|
|
18
|
-
sphinx-rtd-theme = "*"
|
|
19
|
-
sphinxcontrib-mermaid = "*"
|
|
20
|
-
sphinx-needs = "*"
|
|
21
|
-
sphinx-test-reports = "*"
|
|
22
|
-
doxysphinx = "*"
|
|
23
|
-
sphinx-rtd-size = "*"
|
|
24
|
-
sphinxcontrib-datatemplates = "*"
|
|
25
|
-
pyelftools = "*"
|
|
26
|
-
sphinxcontrib-plantuml = "*"
|
|
27
|
-
pipenv = "*"
|
|
28
|
-
|
|
29
|
-
[requires]
|
|
30
|
-
python_version = "3.11"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Software Product Line {{cookiecutter.name}}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Preparation
|
|
5
|
-
|
|
6
|
-
You can install required tools and install some VS Code extensions. The installer uses Scoop/PowerShell, so it will only run on Windows. The installation is done by executing `install-mandatory.bat`. In case you are sitting behind a proxy server, make sure to add:
|
|
7
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
call %~dp0build.bat -install %* || exit /b 1
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"buckets": [
|
|
3
|
-
{
|
|
4
|
-
"Name": "main",
|
|
5
|
-
"Source": "https://github.com/ScoopInstaller/Main"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"Name": "extras",
|
|
9
|
-
"Source": "https://github.com/ScoopInstaller/Extras"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"Name": "versions",
|
|
13
|
-
"Source": "https://github.com/ScoopInstaller/Versions"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"apps": [
|
|
17
|
-
{
|
|
18
|
-
"Source": "main",
|
|
19
|
-
"Name": "lessmsi"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"Source": "main",
|
|
23
|
-
"Name": "7zip"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"Source": "main",
|
|
27
|
-
"Name": "innounp"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"Source": "main",
|
|
31
|
-
"Name": "dark"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"Source": "main",
|
|
35
|
-
"Name": "graphviz"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"Source": "versions",
|
|
39
|
-
"Name": "python311"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"Source": "versions",
|
|
43
|
-
"Name": "mingw-winlibs-llvm-ucrt",
|
|
44
|
-
"Version": "13.2.0-16.0.6-11.0.0-r1"
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
import unittest
|
|
4
|
-
import os.path
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
from utils import run_process
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class TestBuild(unittest.TestCase):
|
|
10
|
-
{% for variant in cookiecutter.variants.values() %}
|
|
11
|
-
def test_build_{{ variant["flavor"] }}__{{ variant["subsystem"] }}(self):
|
|
12
|
-
variant = '{{ variant["flavor"] }}/{{ variant["subsystem"] }}'
|
|
13
|
-
self.build_and_expect_default(variant)
|
|
14
|
-
{% endfor %}
|
|
15
|
-
def build_and_expect_default(self, variant, target='all'):
|
|
16
|
-
"""build wrapper shall build the default target and related outputs."""
|
|
17
|
-
|
|
18
|
-
exit_code = run_process([
|
|
19
|
-
'build.bat',
|
|
20
|
-
'-variants', variant,
|
|
21
|
-
'-target', target,
|
|
22
|
-
'-reconfigure'
|
|
23
|
-
])
|
|
24
|
-
|
|
25
|
-
self.assertEqual(0, exit_code)
|
|
26
|
-
self.expect_binary(variant, file_name="my_main.exe")
|
|
27
|
-
|
|
28
|
-
def expect_binary(self, variant, bin_type='elf', suffix='', file_name=''):
|
|
29
|
-
"""Hex file of given configuration shall exist."""
|
|
30
|
-
self.assert_expected_file_exists(self.get_artifact_name(variant, bin_type, suffix, file_name))
|
|
31
|
-
|
|
32
|
-
def assert_expected_file_exists(self, expected_file):
|
|
33
|
-
self.assertTrue(os.path.isfile(expected_file), f"File {expected_file} shall exist.")
|
|
34
|
-
|
|
35
|
-
@staticmethod
|
|
36
|
-
def get_artifact_name(variant, bin_type='elf', suffix='', file_name='') -> Path:
|
|
37
|
-
"""Hex file of given configuration shall exist."""
|
|
38
|
-
file = file_name if file_name else f"{variant.replace('/', '_')}{suffix}.{bin_type}"
|
|
39
|
-
return Path(f"build/{variant}/prod/{file}")
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
import unittest
|
|
4
|
-
import os.path
|
|
5
|
-
import json
|
|
6
|
-
from utils import run_process
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class TestUnitTests(unittest.TestCase):
|
|
10
|
-
{% for variant in cookiecutter.variants.values() %}
|
|
11
|
-
def test_unit_tests_{{ variant["flavor"] }}__{{ variant["subsystem"] }}(self):
|
|
12
|
-
variant = '{{ variant["flavor"] }}/{{ variant["subsystem"] }}'
|
|
13
|
-
self.build_unittests_and_expect_files(variant)
|
|
14
|
-
{% endfor %}
|
|
15
|
-
def build_unittests_and_expect_files(self, variant):
|
|
16
|
-
exit_code = run_process([
|
|
17
|
-
'build.bat',
|
|
18
|
-
'-variants', variant,
|
|
19
|
-
'-target', 'unittests',
|
|
20
|
-
'-reconfigure'
|
|
21
|
-
])
|
|
22
|
-
|
|
23
|
-
"""Unit tests execution shall pass."""
|
|
24
|
-
self.assertEqual(0, exit_code)
|
|
25
|
-
|
|
26
|
-
"""Coverage report shall be created"""
|
|
27
|
-
expected_file = f"build/{variant}/test/reports/coverage/index.html"
|
|
28
|
-
self.assertTrue(os.path.isfile(expected_file), f"File {expected_file} shall exist.")
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
import os
|
|
3
|
-
from subprocess import Popen, PIPE, CalledProcessError
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"""
|
|
7
|
-
Utility functions needed by all test scripts.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def get_test_data(filename=""):
|
|
12
|
-
return os.path.dirname(__file__) + "/data/" + filename
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def get_output_folder():
|
|
16
|
-
return os.path.dirname(__file__) + "/output"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def run_process(command_list):
|
|
20
|
-
with Popen(command_list, stdout=PIPE, stderr=PIPE, bufsize=1, universal_newlines=True) as p:
|
|
21
|
-
for line in p.stdout:
|
|
22
|
-
print(line, end='')
|
|
23
|
-
for line in p.stderr:
|
|
24
|
-
print(line, end='')
|
|
25
|
-
|
|
26
|
-
return p.returncode
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
if (Test-Path -Path .git) {
|
|
2
|
-
git config --local pull.rebase true
|
|
3
|
-
Write-Host "git config --local pull.rebase was set to 'true'"
|
|
4
|
-
git config --local fetch.prune true
|
|
5
|
-
Write-Host "git config --local fetch.prune was set to 'true'"
|
|
6
|
-
} else {
|
|
7
|
-
Write-Output "This is not a git repository, therefore no configuration was changed."
|
|
8
|
-
}
|
|
Binary file
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Design
|
|
2
|
-
######
|
|
3
|
-
|
|
4
|
-
.. figure:: _images/screenshot.png
|
|
5
|
-
|
|
6
|
-
Requirements
|
|
7
|
-
------------
|
|
8
|
-
|
|
9
|
-
.. needtable::
|
|
10
|
-
:filter: type == 'spec'
|
|
11
|
-
:columns: id, title, tested by, is implemented by
|
|
12
|
-
:style: table
|
|
13
|
-
|
|
14
|
-
.. spec:: First design ID for my component
|
|
15
|
-
:id: S_001
|
|
16
|
-
:version: 1.0
|
|
17
|
-
|
|
18
|
-
This is the first design element of my component.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.. spec:: Second design ID for my component
|
|
22
|
-
:id: S_002
|
|
23
|
-
:version: 1.0
|
|
24
|
-
|
|
25
|
-
This is the second design element of my component.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/** @file */
|
|
2
|
-
|
|
3
|
-
#include "component.h"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/*!
|
|
7
|
-
* @rst
|
|
8
|
-
*
|
|
9
|
-
* .. impl:: someInterfaceOfComponent
|
|
10
|
-
* :id: I_001
|
|
11
|
-
* :implements: S_001
|
|
12
|
-
*
|
|
13
|
-
* This function returns the magical number
|
|
14
|
-
*
|
|
15
|
-
* @endrst
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
int someInterfaceOfComponent()
|
|
19
|
-
{
|
|
20
|
-
int result = 7; /* The most magical number. */
|
|
21
|
-
|
|
22
|
-
#ifdef THE_ANSWER
|
|
23
|
-
result = THE_ANSWER;
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
#ifdef THE_OFFSET
|
|
27
|
-
result += THE_OFFSET;
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
extern int someInterfaceOfComponent();
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/** @file */
|
|
2
|
-
|
|
3
|
-
#include <gtest/gtest.h>
|
|
4
|
-
using namespace testing;
|
|
5
|
-
|
|
6
|
-
extern "C"
|
|
7
|
-
{
|
|
8
|
-
#include "component.h"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
#include "mockup_components_component.h"
|
|
12
|
-
|
|
13
|
-
/*! \mainpage
|
|
14
|
-
*
|
|
15
|
-
* TODO: table of tests
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/*!
|
|
20
|
-
* @rst
|
|
21
|
-
*
|
|
22
|
-
* .. test:: component.test_someInterfaceOfComponent
|
|
23
|
-
* :id: T_001
|
|
24
|
-
* :tests: S_001, S_002
|
|
25
|
-
* :results: [[tr_link('title', 'case')]]
|
|
26
|
-
*
|
|
27
|
-
* Some test specification
|
|
28
|
-
*
|
|
29
|
-
* @endrst
|
|
30
|
-
*/
|
|
31
|
-
TEST(component, test_someInterfaceOfComponent)
|
|
32
|
-
{
|
|
33
|
-
/* mock all external dependencies of component */
|
|
34
|
-
CREATE_MOCK(mymock);
|
|
35
|
-
|
|
36
|
-
/* test interface */
|
|
37
|
-
EXPECT_EQ(7, someInterfaceOfComponent());
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/*!
|
|
42
|
-
* @rst
|
|
43
|
-
*
|
|
44
|
-
* .. test:: component.test_someInterfaceOfComponent2
|
|
45
|
-
* :id: T_002
|
|
46
|
-
* :tests: S_001
|
|
47
|
-
* :results: [[tr_link('title', 'case')]]
|
|
48
|
-
*
|
|
49
|
-
* Some test specification 2
|
|
50
|
-
*
|
|
51
|
-
* @endrst
|
|
52
|
-
*/
|
|
53
|
-
TEST(component, test_someInterfaceOfComponent2)
|
|
54
|
-
{
|
|
55
|
-
/* mock all external dependencies of component */
|
|
56
|
-
CREATE_MOCK(mymock);
|
|
57
|
-
|
|
58
|
-
/* test interface */
|
|
59
|
-
EXPECT_EQ(7, someInterfaceOfComponent());
|
|
60
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#include "autoconf.h"
|
|
2
|
-
|
|
3
|
-
#if CONFIG_USE_COMPONENT
|
|
4
|
-
#include "component.h"
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
#include <stdio.h>
|
|
8
|
-
|
|
9
|
-
int main(void)
|
|
10
|
-
{
|
|
11
|
-
printf("Main program calculating ...\n");
|
|
12
|
-
#if CONFIG_USE_COMPONENT
|
|
13
|
-
return someInterfaceOfComponent();
|
|
14
|
-
#else
|
|
15
|
-
return 0;
|
|
16
|
-
#endif
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CONFIG_USE_COMPONENT=y
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import dataclasses
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@dataclasses.dataclass
|
|
5
|
-
class Variant:
|
|
6
|
-
flavor: str
|
|
7
|
-
subsystem: str
|
|
8
|
-
|
|
9
|
-
@classmethod
|
|
10
|
-
def from_string(cls, variant: str) -> "Variant":
|
|
11
|
-
return cls(*variant.split("/"))
|
|
12
|
-
|
|
13
|
-
def __str__(self) -> str:
|
|
14
|
-
return self.to_string()
|
|
15
|
-
|
|
16
|
-
def to_string(self, delimiter: str = "/") -> str:
|
|
17
|
-
return f"{self.flavor}{delimiter}{self.subsystem}"
|
|
18
|
-
|
|
19
|
-
def __lt__(self, other: "Variant") -> bool:
|
|
20
|
-
return f"{self}" < f"{other}"
|
|
21
|
-
|
|
22
|
-
def __hash__(self) -> int:
|
|
23
|
-
return hash(f"{self}")
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
from spl_core.project_creator.variant import Variant
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class WorkspaceArtifacts:
|
|
7
|
-
def __init__(self, project_root_dir: Path):
|
|
8
|
-
self.workspace_root_dir = project_root_dir
|
|
9
|
-
self.variants_dir = self.root_dir.joinpath("variants")
|
|
10
|
-
self.src_dir = self.root_dir.joinpath("src")
|
|
11
|
-
self.test_dir = self.root_dir.joinpath("test")
|
|
12
|
-
self.components_dir = self.root_dir.joinpath("components")
|
|
13
|
-
|
|
14
|
-
@property
|
|
15
|
-
def root_dir(self) -> Path:
|
|
16
|
-
return self.workspace_root_dir
|
|
17
|
-
|
|
18
|
-
@property
|
|
19
|
-
def build_script(self) -> Path:
|
|
20
|
-
return self.root_dir.joinpath("build.bat")
|
|
21
|
-
|
|
22
|
-
@property
|
|
23
|
-
def kconfig_model_file(self) -> Path:
|
|
24
|
-
return self.root_dir.joinpath("KConfig")
|
|
25
|
-
|
|
26
|
-
def get_build_dir(self, variant: Variant, build_kit: str) -> Path:
|
|
27
|
-
return self.root_dir.joinpath(f"build/{variant}/{build_kit}")
|
|
28
|
-
|
|
29
|
-
def get_variant_dir(self, variant: Variant) -> Path:
|
|
30
|
-
return self.variants_dir.joinpath(f"{variant.flavor}/{variant.subsystem}")
|
|
31
|
-
|
|
32
|
-
def get_component_path(self, component_name: str) -> Path:
|
|
33
|
-
return self.components_dir.joinpath(component_name)
|
|
34
|
-
|
|
35
|
-
def get_kconfig_config_file(self, variant: Variant) -> Path:
|
|
36
|
-
return self.get_variant_dir(variant).joinpath("config.txt")
|
spl_core-4.1.1.dist-info/RECORD
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
spl_core/__init__.py,sha256=NtWqZUv_8plp1gndoYX_eAqe7K65oPMh-hIvB4Evdc8,22
|
|
2
|
-
spl_core/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
spl_core/common/cmake.py,sha256=qId_QIGqvG_qkJWOTJjiW723nev6p0vvP3O0Jlfppz4,2054
|
|
4
|
-
spl_core/common/command_line_executor.py,sha256=2ck2ndExyjfFORGMHhtOPTWA3gJGJ_GdZfopen2ISoY,2019
|
|
5
|
-
spl_core/common/path.py,sha256=sDujd3n4XP1XGjHc7ImXEdjihO6A8BOIDbKCf7HgQ0Y,462
|
|
6
|
-
spl_core/gcov_maid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
spl_core/gcov_maid/gcov_maid.py,sha256=5rPIeL9daQDm5ad9xzaIhlDf_0H5g6r2zHo8WN8T4-8,1455
|
|
8
|
-
spl_core/kconfig/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
spl_core/kconfig/kconfig.py,sha256=JLBSUvPnc5dEZNWHeuMTFgP9iBgtzEV6tnrhE4-5oCg,9795
|
|
10
|
-
spl_core/project_creator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
spl_core/project_creator/creator.py,sha256=7ZqvZvRNnc5SEHR5cVWbQo_bdx_6MdnnZjMmBl42duQ,7342
|
|
12
|
-
spl_core/project_creator/templates/project/cookiecutter.json,sha256=HCUx6lG5wp3jNRXWEKZqZ096OWe41heBSAOcE_fCI5U,239
|
|
13
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.flake8,sha256=kgKveqEvsPV3JYvGLVyHLVjOJnNiJtQhPg6_-tximjg,33
|
|
14
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.gitignore,sha256=hH8vBruOUXqyAHrUQF5GFphZl9Fyui7wSQIOYzhh7xA,599
|
|
15
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/cmake-kits.json,sha256=oLn_-InkXE3Th6OL5hlSxBZsx2dBaKShrHZVcyAcfFU,269
|
|
16
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/cmake-variants.json,sha256=6n6uz5otAB7jDXjZ8oRb0tPyjoSlNdFnfdqgzcfPNy4,718
|
|
17
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/extensions.json,sha256=U4zyzsCTgtTSGxIZfx2EPCc8mSkQojToRJrTvIbvePQ,626
|
|
18
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/launch.json,sha256=30-tsNapUNNIvVDohdIf4SEnHrHh8qbWuTjLJjsMcEY,1103
|
|
19
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/settings.json,sha256=w2zAkNk4P0eZC5zDxiG7jKy35Jl37TyVDg38lXjq3hw,1369
|
|
20
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/.vscode/tasks.json,sha256=hUTtAbZHg6nYMj9MDzCZP_NljtfYP8MRmQZfr9wSBzI,2853
|
|
21
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/CMakeLists.txt,sha256=YHU4FBV3K4O3MUk289tLpC_t-rEAdbcXylWqNHRPVFY,1400
|
|
22
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/KConfig,sha256=gqH4r2MYLLDtfUDQo2nYyx-rgHjBI62ca5U9TTlLFpc,598
|
|
23
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/LICENSE,sha256=be3z6Wl8HeMABfG-fLSW2qst-PXlaByWyCbC6ztQT9A,1108
|
|
24
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/Pipfile,sha256=Axw_VeFUvmaDzw2zKCbzv6ddzerOXy_eoVi-fFwm8Y8,513
|
|
25
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/README.md,sha256=3-uBrhvLWhjaaJxKVQXc3kajwS2o49_snrQxw6V8kWM,337
|
|
26
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/build.bat,sha256=HlOqePYRoHTrp7v6oQ551dXI-qCymGCG0gQ9Au6bpos,73
|
|
27
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/build.ps1,sha256=37Eui885PQC62nOD6l4dEgaeXBntiVxLBy_NYWvWDzU,10528
|
|
28
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/conf.py,sha256=XW0r8mvCGerII6x6VdM1am6YCCbMHlgbt29gV_Or7MQ,6705
|
|
29
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/Doxyfile.in,sha256=5uIpFspgzbingisvfrcBgeyQiTDHhG44p8NMOozTNhY,123927
|
|
30
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/common/index.rst,sha256=p0XOOYX5XotNXejofYCjXBYsOy0QjNqRtZGniuYPsdk,90
|
|
31
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/components/index.rst,sha256=qhreMConWRUC9OYlfSsSWNPMRyZKME2ivd4ueHcVcEQ,594
|
|
32
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/doxygen-awesome/LICENSE,sha256=49p1TD9lfMeFlPouijKDZl94x0PfJIX6nkmKiXMFEZE,1072
|
|
33
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/doxygen-awesome/doxygen-awesome.css,sha256=m1VJkokG6ZdMwS3N3pJl4BbcI4jsctWqMgn0hwkUoMg,63071
|
|
34
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/software_architecture/index.rst,sha256=Oq602GCpTJmV-uQDfsvgcEChSLGNDPIjBecCXv5wEg0,44
|
|
35
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/software_requirements/index.rst,sha256=FmnMsx1Ih2qulGuLcch7vBW5Gxkv42P3BeAeih7c3Ro,95
|
|
36
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/doc/test_report_template.txt,sha256=F_qH5rWeWwxgyBzgrNKFZZYJkdlhywkGfHzfgs7p3HY,1217
|
|
37
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/index.rst,sha256=vFQncd7ntE0a4I83t6kGX-m-c9adikHafcfCBBrnSrA,1021
|
|
38
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/install-mandatory.bat,sha256=Oxf85_f-_drpHC2HwXmuUJhiQTqjIVLjpXxZAXybpjU,46
|
|
39
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/pytest.ini,sha256=_YasykG54VqyrI2cu4i6kjwlvgjWM_J38WK0tKd4p5I,127
|
|
40
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/scoopfile.json,sha256=UILWT03cwQSlwy-uQE7CyMTOC5MhRjwvRmmtzTVqutM,1077
|
|
41
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/test/test_build.py,sha256=aHHysM-gbunq3dI5iVlr4EEMQ18iI9MuPY2FWTdach0,1518
|
|
42
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/test/test_unittests.py,sha256=1hqIDuQbdj6qhk95N3OpauSlCbiU9ngrZUwceKoUnik,941
|
|
43
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/test/utils.py,sha256=fsENbNh5o_eZ-yNf7CeWnmHqWZefTZg4zUr8r-Vshtk,617
|
|
44
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/tools/setup/git-config.ps1,sha256=7T0Wp9CHkUz59PEv0ne7moB-psmZY3g611XLDURqB60,348
|
|
45
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/CMakeLists.txt,sha256=ftN3X8KJ90HBCDLgVReRjtF_DhIZwu9QFwvaKDkFXUA,123
|
|
46
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/doc/_images/screenshot.png,sha256=5tlbNvwdAfjoNvLQZi7gf0qEpLpUGlELQcemFkSxCf4,7588
|
|
47
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/doc/design.rst,sha256=QgGLbVLAslK-L9IOKwGmcc1prngDO2m04Dv2dN7inSA,477
|
|
48
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/doc/index.rst,sha256=eSPnByL--WOq07UZdqOZZ5xCbhbB2OztP5-Vw64yW3Q,135
|
|
49
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/src/component.c,sha256=e0r-QKQsKTJ-cBVDy8P6N2wvKpxlxnWjBhTACeJFgps,433
|
|
50
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/src/component.h,sha256=EMV6EHUoDpGBKhRUSIehz_eTqodI_0IT2UaCwqaEl2s,40
|
|
51
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/component/test/test_component.cc,sha256=Bsii142GWMKwXocNQU_Pxe6KUOjYCfOhNL8uLDriPIQ,1048
|
|
52
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/main/CMakeLists.txt,sha256=9gu3ydUv1cT3WjXw944lAvVK0MzJaCD1zKqvRZmTt_o,68
|
|
53
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/main/doc/index.rst,sha256=GaebL8DcYNK6WzgyxVNofuFIwu05qoxeSgYF1i-3jPY,311
|
|
54
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_components -%} components {%- endif %}/main/src/main.c,sha256=Pru_qMzFrA6AKwzv3hhgQ_X2GvubVESroC6C7jQqs2A,272
|
|
55
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_tools -%} tools {%- endif %}/toolchains/clang/toolchain.cmake,sha256=5AhXh0a7OUeDC4LC9cqIRq2m4sJytXWZYVjD6HbEgCI,714
|
|
56
|
-
spl_core/project_creator/templates/project/{{cookiecutter.name}}/{% if cookiecutter.touch_tools -%} tools {%- endif %}/toolchains/gcc/toolchain.cmake,sha256=AmLzPyhTgfc_Dsre4AlsvSOkVGW6VswWvrEnUL8JLhA,183
|
|
57
|
-
spl_core/project_creator/templates/variant/cookiecutter.json,sha256=S4lvDcIKiBQkvzJ_CBFRhZfK5o22uSi6O2TdWJjz1lM,57
|
|
58
|
-
spl_core/project_creator/templates/variant/{{cookiecutter.flavor}}/{{cookiecutter.subsystem}}/config.cmake,sha256=SbFIGrclTicjW-TNH4QlUilaSs1CCmL882PBrlVau8g,94
|
|
59
|
-
spl_core/project_creator/templates/variant/{{cookiecutter.flavor}}/{{cookiecutter.subsystem}}/config.txt,sha256=xnRiDo-MKT-LjNbK7TUGceo7tCVp4Cs3hAWozHZcH-A,24
|
|
60
|
-
spl_core/project_creator/templates/variant/{{cookiecutter.flavor}}/{{cookiecutter.subsystem}}/parts.cmake,sha256=s-SMLPvajH4ZGupruSuh-SbL8jackverQpxGqdoD-Io,77
|
|
61
|
-
spl_core/project_creator/variant.py,sha256=juZWBvLT7i1ZtP1LlGBDalzTf0mhFvfoON43VoqjZOA,532
|
|
62
|
-
spl_core/project_creator/workspace_artifacts.py,sha256=E4oZjnFgC2-cz9jYIYUZzOC9R07LBJAbgGwHAuK0Arg,1279
|
|
63
|
-
spl_core/test_utils/base_variant_test_runner.py,sha256=FRPkyEyUVsFMmfshzooXzOPUeYaoMBQKFVi5m671P38,2665
|
|
64
|
-
spl_core/test_utils/spl_build.py,sha256=J7gj9Q979pivkYi6Bm2YUSCpjCXQ72rioCZbAgcCoLY,2172
|
|
65
|
-
spl_core-4.1.1.dist-info/LICENSE,sha256=UjjA0o8f5tT3wVm7qodTLAhPWLl6kgVyn9FPAd1VeYY,1099
|
|
66
|
-
spl_core-4.1.1.dist-info/METADATA,sha256=T0AkQPYgFf7UCpqGiAZqJ26AN_0l39OT7_qcbG9XKfg,1997
|
|
67
|
-
spl_core-4.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
68
|
-
spl_core-4.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|