spl-core 7.4.0__tar.gz → 7.5.0__tar.gz
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-7.4.0 → spl_core-7.5.0}/PKG-INFO +1 -1
- {spl_core-7.4.0 → spl_core-7.5.0}/pyproject.toml +3 -1
- spl_core-7.5.0/src/spl_core/__init__.py +1 -0
- spl_core-7.5.0/src/spl_core/kickstart/templates/application/test/EnglishVariant/test__EnglishVariant.py +56 -0
- spl_core-7.5.0/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py +56 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/test_utils/base_variant_test_runner.py +16 -6
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/test_utils/spl_build.py +71 -25
- spl_core-7.4.0/src/spl_core/__init__.py +0 -1
- spl_core-7.4.0/src/spl_core/kickstart/templates/application/test/EnglishVariant/test__EnglishVariant.py +0 -16
- spl_core-7.4.0/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py +0 -16
- {spl_core-7.4.0 → spl_core-7.5.0}/LICENSE +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/README.md +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/__run.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/common/__init__.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/common/command_line_executor.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/common/path.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/common.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/conan.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/config/KConfig +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/gcov_maid/__init__.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/gcov_maid/gcov_maid.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kconfig/__init__.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kconfig/kconfig.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kconfig.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/__init__.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/create.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/.vscode/cmake-variants.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/KConfig +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/greeter/CMakeLists.txt +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/greeter/doc/_images/screenshot.png +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/greeter/doc/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.c +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.h +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/greeter/test/test_greeter.cc +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/main/CMakeLists.txt +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/main/doc/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/main/src/main.c +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/config.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/parts.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.txt +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/variants/GermanVariant/parts.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.gitignore +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/cmake-kits.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/extensions.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/launch.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/settings.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/tasks.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/CMakeLists.txt +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/README.md +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/bootstrap.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/build.bat +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/build.ps1 +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/conf.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/Doxyfile.in +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/common/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/components/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/doxygen-awesome/LICENSE +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/doxygen-awesome/doxygen-awesome.css +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/software_architecture/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/software_requirements/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/test_report_template.txt +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/index.rst +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/pypeline.yaml +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/pyproject.toml +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/pytest.ini +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/scoopfile.json +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/tools/toolchains/clang/toolchain.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/tools/toolchains/gcc/toolchain.cmake +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/main.py +0 -0
- {spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/spl.cmake +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "spl-core"
|
|
3
|
-
version = "7.
|
|
3
|
+
version = "7.5.0"
|
|
4
4
|
description = "Software Product Line Support for CMake"
|
|
5
5
|
authors = ["Avengineers <karsten.guenther@kamg.de>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -138,6 +138,8 @@ exclude = ["bootstrap.py", "src/spl_core/kickstart/templates/project/conf.py"]
|
|
|
138
138
|
"setup.py" = ["D100"]
|
|
139
139
|
"conftest.py" = ["D100"]
|
|
140
140
|
"docs/conf.py" = ["D100"]
|
|
141
|
+
"**/test_*.py" = ["S101"]
|
|
142
|
+
"src/spl_core/test_utils/base_variant_test_runner.py" = ["S101"]
|
|
141
143
|
|
|
142
144
|
[tool.ruff.lint.isort]
|
|
143
145
|
known-first-party = ["spl_core", "tests"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "7.5.0"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from spl_core.test_utils.spl_build import SplBuild
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Test_EnglishVariant:
|
|
9
|
+
variant: str = "EnglishVariant"
|
|
10
|
+
components: ClassVar[list[str]] = ["src/greeter"]
|
|
11
|
+
|
|
12
|
+
@pytest.mark.unittests
|
|
13
|
+
def test_unittests(self) -> None:
|
|
14
|
+
# Arrange
|
|
15
|
+
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="test", build_type="Debug", target="unittests")
|
|
16
|
+
|
|
17
|
+
# Act
|
|
18
|
+
result = spl_build.execute()
|
|
19
|
+
|
|
20
|
+
# Assert
|
|
21
|
+
assert result == 0, "Building unittests failed"
|
|
22
|
+
for artifact in spl_build.get_components_artifacts(self.components):
|
|
23
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
24
|
+
|
|
25
|
+
@pytest.mark.reports
|
|
26
|
+
def test_reports(self) -> None:
|
|
27
|
+
# Arrange
|
|
28
|
+
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="test", build_type="Debug", target="reports")
|
|
29
|
+
|
|
30
|
+
# Act
|
|
31
|
+
result = spl_build.execute()
|
|
32
|
+
|
|
33
|
+
# Assert
|
|
34
|
+
assert result == 0, "Building reports failed"
|
|
35
|
+
for artifact in spl_build.get_components_artifacts(self.components):
|
|
36
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
37
|
+
|
|
38
|
+
@pytest.mark.build
|
|
39
|
+
@pytest.mark.parametrize(
|
|
40
|
+
("build_type"),
|
|
41
|
+
[
|
|
42
|
+
pytest.param("Debug", marks=pytest.mark.debug),
|
|
43
|
+
pytest.param("Release", marks=pytest.mark.release),
|
|
44
|
+
],
|
|
45
|
+
)
|
|
46
|
+
def test_build(self, build_type: str) -> None:
|
|
47
|
+
# Arrange
|
|
48
|
+
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="prod", build_type=build_type, target="all")
|
|
49
|
+
|
|
50
|
+
# Act
|
|
51
|
+
result = spl_build.execute()
|
|
52
|
+
|
|
53
|
+
# Assert
|
|
54
|
+
assert result == 0, "Building failed"
|
|
55
|
+
for artifact in [spl_build.build_dir / "main.exe", *spl_build.get_variant_artifacts()]:
|
|
56
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
spl_core-7.5.0/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from spl_core.test_utils.spl_build import SplBuild
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Test_GermanVariant:
|
|
9
|
+
variant: str = "GermanVariant"
|
|
10
|
+
components: ClassVar[list[str]] = ["src/greeter"]
|
|
11
|
+
|
|
12
|
+
@pytest.mark.unittests
|
|
13
|
+
def test_unittests(self) -> None:
|
|
14
|
+
# Arrange
|
|
15
|
+
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="test", build_type="Debug", target="unittests")
|
|
16
|
+
|
|
17
|
+
# Act
|
|
18
|
+
result = spl_build.execute()
|
|
19
|
+
|
|
20
|
+
# Assert
|
|
21
|
+
assert result == 0, "Building unittests failed"
|
|
22
|
+
for artifact in spl_build.get_components_artifacts(self.components):
|
|
23
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
24
|
+
|
|
25
|
+
@pytest.mark.reports
|
|
26
|
+
def test_reports(self) -> None:
|
|
27
|
+
# Arrange
|
|
28
|
+
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="test", build_type="Debug", target="reports")
|
|
29
|
+
|
|
30
|
+
# Act
|
|
31
|
+
result = spl_build.execute()
|
|
32
|
+
|
|
33
|
+
# Assert
|
|
34
|
+
assert result == 0, "Building reports failed"
|
|
35
|
+
for artifact in spl_build.get_components_artifacts(self.components):
|
|
36
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
37
|
+
|
|
38
|
+
@pytest.mark.build
|
|
39
|
+
@pytest.mark.parametrize(
|
|
40
|
+
("build_type"),
|
|
41
|
+
[
|
|
42
|
+
pytest.param("Debug", marks=pytest.mark.debug),
|
|
43
|
+
pytest.param("Release", marks=pytest.mark.release),
|
|
44
|
+
],
|
|
45
|
+
)
|
|
46
|
+
def test_build(self, build_type: str) -> None:
|
|
47
|
+
# Arrange
|
|
48
|
+
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="prod", build_type=build_type, target="all")
|
|
49
|
+
|
|
50
|
+
# Act
|
|
51
|
+
result = spl_build.execute()
|
|
52
|
+
|
|
53
|
+
# Assert
|
|
54
|
+
assert result == 0, "Building failed"
|
|
55
|
+
for artifact in [spl_build.build_dir / "main.exe", *spl_build.get_variant_artifacts()]:
|
|
56
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
@@ -55,14 +55,14 @@ class BaseVariantTestRunner(ABC):
|
|
|
55
55
|
|
|
56
56
|
def assert_artifact_exists(self, dir: Path, artifact: Path) -> None:
|
|
57
57
|
if artifact.is_absolute():
|
|
58
|
-
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
58
|
+
assert artifact.exists(), f"Artifact {artifact} does not exist"
|
|
59
59
|
else:
|
|
60
|
-
assert Path.joinpath(dir, artifact).exists(), f"Artifact {Path.joinpath(dir, artifact)} does not exist"
|
|
60
|
+
assert Path.joinpath(dir, artifact).exists(), f"Artifact {Path.joinpath(dir, artifact)} does not exist"
|
|
61
61
|
|
|
62
62
|
@pytest.mark.build
|
|
63
63
|
def test_build(self, build_type: Optional[str] = None) -> None:
|
|
64
64
|
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="prod", build_type=build_type)
|
|
65
|
-
assert 0 == spl_build.execute(target="all")
|
|
65
|
+
assert 0 == spl_build.execute(target="all")
|
|
66
66
|
for artifact in self.expected_build_artifacts:
|
|
67
67
|
self.assert_artifact_exists(dir=spl_build.build_dir, artifact=artifact)
|
|
68
68
|
if self.create_artifacts_archive:
|
|
@@ -74,16 +74,26 @@ class BaseVariantTestRunner(ABC):
|
|
|
74
74
|
@pytest.mark.unittests
|
|
75
75
|
def test_unittests(self, build_type: Optional[str] = None) -> None:
|
|
76
76
|
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="test", build_type=build_type)
|
|
77
|
-
assert 0 == spl_build.execute(target="unittests")
|
|
77
|
+
assert 0 == spl_build.execute(target="unittests")
|
|
78
78
|
for artifact in self.expected_test_artifacts:
|
|
79
79
|
self.assert_artifact_exists(dir=spl_build.build_dir, artifact=artifact)
|
|
80
80
|
|
|
81
81
|
@pytest.mark.reports
|
|
82
82
|
def test_reports(self, build_type: Optional[str] = None) -> None:
|
|
83
83
|
spl_build: SplBuild = SplBuild(variant=self.variant, build_kit="test", build_type=build_type)
|
|
84
|
-
assert 0 == spl_build.execute(target="reports")
|
|
84
|
+
assert 0 == spl_build.execute(target="reports")
|
|
85
85
|
for artifact in self.expected_variant_report_artifacts:
|
|
86
86
|
self.assert_artifact_exists(dir=spl_build.build_dir, artifact=artifact)
|
|
87
87
|
for component in self.component_paths:
|
|
88
88
|
for artifact in self.expected_component_report_artifacts:
|
|
89
|
-
self.assert_artifact_exists(
|
|
89
|
+
self.assert_artifact_exists(
|
|
90
|
+
dir=Path.joinpath(
|
|
91
|
+
spl_build.build_dir,
|
|
92
|
+
"reports",
|
|
93
|
+
"html",
|
|
94
|
+
spl_build.build_dir,
|
|
95
|
+
component,
|
|
96
|
+
"reports",
|
|
97
|
+
),
|
|
98
|
+
artifact=artifact,
|
|
99
|
+
)
|
|
@@ -3,7 +3,7 @@ import time
|
|
|
3
3
|
import zipfile
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import List, Optional
|
|
6
|
+
from typing import Callable, ClassVar, List, Optional
|
|
7
7
|
|
|
8
8
|
from py_app_dev.core.logging import time_it
|
|
9
9
|
|
|
@@ -39,54 +39,76 @@ class ArtifactsCollection:
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class SplBuild:
|
|
42
|
-
"""
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
"""
|
|
43
|
+
Class for building an SPL repository.
|
|
44
|
+
|
|
45
|
+
Relies on build.bat in the root of the SPL repository.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
@dataclass
|
|
49
|
+
class BuildArtifacts:
|
|
50
|
+
artifacts: list[str]
|
|
51
|
+
# callable to resolve the path to the component artifacts specific to the build target
|
|
52
|
+
path_resolver: Callable[[Path, str], Path]
|
|
53
|
+
|
|
54
|
+
TARGET_VARIANT_BUILD_ARTIFACTS: ClassVar[dict[str, list[str]]] = {"prod/all": ["compile_commands.json"]}
|
|
55
|
+
|
|
56
|
+
TARGET_COMPONENT_BUILD_ARTIFACTS: ClassVar[dict[str, "SplBuild.BuildArtifacts"]] = {
|
|
57
|
+
"test/unittests": BuildArtifacts(
|
|
58
|
+
[
|
|
59
|
+
"coverage.json",
|
|
60
|
+
"junit.xml",
|
|
61
|
+
"reports/coverage/index.html",
|
|
62
|
+
],
|
|
63
|
+
lambda build_dir, component_name: build_dir / component_name,
|
|
64
|
+
),
|
|
65
|
+
"test/reports": BuildArtifacts(
|
|
66
|
+
[
|
|
67
|
+
"coverage.html",
|
|
68
|
+
"coverage/index.html",
|
|
69
|
+
"doxygen/html/index.html",
|
|
70
|
+
"unit_test_results.html",
|
|
71
|
+
"unit_test_spec.html",
|
|
72
|
+
],
|
|
73
|
+
lambda build_dir, component_name: build_dir / "reports" / "html" / build_dir / component_name / "reports",
|
|
74
|
+
),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
def __init__(self, variant: str, build_kit: str, build_type: Optional[str] = None, target: Optional[str] = None) -> None:
|
|
54
78
|
self.variant = variant
|
|
55
79
|
self.build_kit = build_kit
|
|
56
80
|
self.build_type = build_type
|
|
81
|
+
self.target = target
|
|
57
82
|
|
|
58
83
|
@property
|
|
59
84
|
def build_dir(self) -> Path:
|
|
60
85
|
"""
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Returns:
|
|
64
|
-
Path: The build directory path.
|
|
65
|
-
|
|
86
|
+
Output directory of all build artifacts.
|
|
66
87
|
"""
|
|
67
88
|
if self.build_type:
|
|
68
89
|
return Path(f"build/{self.variant}/{self.build_kit}/{self.build_type}")
|
|
69
90
|
return Path(f"build/{self.variant}/{self.build_kit}")
|
|
70
91
|
|
|
71
92
|
@time_it()
|
|
72
|
-
def execute(self, target: str, additional_args: Optional[List[str]] = None) -> int:
|
|
93
|
+
def execute(self, target: Optional[str] = None, additional_args: Optional[List[str]] = None) -> int:
|
|
73
94
|
"""
|
|
74
|
-
|
|
95
|
+
Execute an SPL build (of a given target).
|
|
75
96
|
|
|
76
97
|
Args:
|
|
77
|
-
target
|
|
78
|
-
additional_args
|
|
98
|
+
target: The target to build, optional, defaults to value given in the constructor.
|
|
99
|
+
additional_args: Additional arguments to pass to the build command.
|
|
79
100
|
|
|
80
101
|
Returns:
|
|
81
102
|
int: 0 in case of success.
|
|
82
103
|
|
|
83
104
|
"""
|
|
84
|
-
if
|
|
85
|
-
|
|
105
|
+
if target is None:
|
|
106
|
+
target = self.target if self.target else "all"
|
|
86
107
|
return_code = -1
|
|
87
108
|
while True:
|
|
88
109
|
cmd = [
|
|
89
110
|
"build.bat",
|
|
111
|
+
"-build",
|
|
90
112
|
"-buildKit",
|
|
91
113
|
self.build_kit,
|
|
92
114
|
"-variants",
|
|
@@ -97,7 +119,8 @@ class SplBuild:
|
|
|
97
119
|
]
|
|
98
120
|
if self.build_type:
|
|
99
121
|
cmd.extend(["-buildType", self.build_type])
|
|
100
|
-
|
|
122
|
+
if additional_args:
|
|
123
|
+
cmd.extend(additional_args)
|
|
101
124
|
result = CommandLineExecutor().execute(cmd)
|
|
102
125
|
return_code = result.returncode
|
|
103
126
|
if result.returncode:
|
|
@@ -113,6 +136,29 @@ class SplBuild:
|
|
|
113
136
|
break
|
|
114
137
|
return return_code
|
|
115
138
|
|
|
139
|
+
def get_component_artifacts(self, component_name: str) -> list[Path]:
|
|
140
|
+
if not self.target:
|
|
141
|
+
return []
|
|
142
|
+
target_data = self.TARGET_COMPONENT_BUILD_ARTIFACTS.get(self.build_kit + "/" + self.target)
|
|
143
|
+
if not target_data:
|
|
144
|
+
return []
|
|
145
|
+
|
|
146
|
+
return [target_data.path_resolver(self.build_dir, component_name) / artifact for artifact in target_data.artifacts]
|
|
147
|
+
|
|
148
|
+
def get_components_artifacts(self, component_names: list[str]) -> list[Path]:
|
|
149
|
+
artifacts = []
|
|
150
|
+
for component_name in component_names:
|
|
151
|
+
artifacts.extend(self.get_component_artifacts(component_name))
|
|
152
|
+
return artifacts
|
|
153
|
+
|
|
154
|
+
def get_variant_artifacts(self) -> list[Path]:
|
|
155
|
+
if not self.target:
|
|
156
|
+
return []
|
|
157
|
+
target_data = self.TARGET_VARIANT_BUILD_ARTIFACTS.get(self.build_kit + "/" + self.target)
|
|
158
|
+
if not target_data:
|
|
159
|
+
return []
|
|
160
|
+
return [self.build_dir / artifact for artifact in target_data]
|
|
161
|
+
|
|
116
162
|
def create_artifacts_archive(self, expected_artifacts: List[Path]) -> Path:
|
|
117
163
|
"""
|
|
118
164
|
Create a zip file containing the collected artifacts.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "7.4.0"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
from typing import List
|
|
3
|
-
|
|
4
|
-
from spl_core.test_utils.base_variant_test_runner import BaseVariantTestRunner
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Test_EnglishVariant(BaseVariantTestRunner):
|
|
8
|
-
@property
|
|
9
|
-
def component_paths(self) -> List[Path]:
|
|
10
|
-
return [
|
|
11
|
-
Path("src/greeter"),
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
@property
|
|
15
|
-
def expected_build_artifacts(self) -> List[Path]:
|
|
16
|
-
return [Path("my_main.exe"), Path("compile_commands.json")]
|
spl_core-7.4.0/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
from typing import List
|
|
3
|
-
|
|
4
|
-
from spl_core.test_utils.base_variant_test_runner import BaseVariantTestRunner
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Test_GermanVariant(BaseVariantTestRunner):
|
|
8
|
-
@property
|
|
9
|
-
def component_paths(self) -> List[Path]:
|
|
10
|
-
return [
|
|
11
|
-
Path("src/greeter"),
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
@property
|
|
15
|
-
def expected_build_artifacts(self) -> List[Path]:
|
|
16
|
-
return [Path("my_main.exe"), Path("compile_commands.json")]
|
|
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
|
|
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
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/application/src/main/src/main.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/cmake-kits.json
RENAMED
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/extensions.json
RENAMED
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/launch.json
RENAMED
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/settings.json
RENAMED
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/.vscode/tasks.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/common/index.rst
RENAMED
|
File without changes
|
{spl_core-7.4.0 → spl_core-7.5.0}/src/spl_core/kickstart/templates/project/doc/components/index.rst
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|