spl-core 9.1.2__tar.gz → 9.2.1__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.
Files changed (78) hide show
  1. {spl_core-9.1.2 → spl_core-9.2.1}/PKG-INFO +1 -1
  2. {spl_core-9.1.2 → spl_core-9.2.1}/pyproject.toml +1 -1
  3. spl_core-9.2.1/src/spl_core/__init__.py +1 -0
  4. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/test_utils/artifacts_archiver.py +42 -7
  5. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/test_utils/junit_merger.py +4 -2
  6. spl_core-9.1.2/src/spl_core/__init__.py +0 -1
  7. {spl_core-9.1.2 → spl_core-9.2.1}/LICENSE +0 -0
  8. {spl_core-9.1.2 → spl_core-9.2.1}/README.md +0 -0
  9. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/__run.py +0 -0
  10. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/common/__init__.py +0 -0
  11. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/common/path.py +0 -0
  12. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/common.cmake +0 -0
  13. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/conan.cmake +0 -0
  14. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/config/KConfig +0 -0
  15. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/gcov_maid/__init__.py +0 -0
  16. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/gcov_maid/gcov_maid.py +0 -0
  17. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kconfig/__init__.py +0 -0
  18. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kconfig/kconfig.py +0 -0
  19. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kconfig.cmake +0 -0
  20. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/__init__.py +0 -0
  21. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/create.py +0 -0
  22. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/.vscode/cmake-variants.json +0 -0
  23. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/KConfig +0 -0
  24. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/greeter/CMakeLists.txt +0 -0
  25. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/greeter/doc/_images/screenshot.png +0 -0
  26. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/greeter/doc/index.md +0 -0
  27. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.c +0 -0
  28. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/greeter/src/greeter.h +0 -0
  29. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/greeter/test/test_greeter.cc +0 -0
  30. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/main/CMakeLists.txt +0 -0
  31. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/main/doc/index.md +0 -0
  32. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/src/main/src/main.c +0 -0
  33. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/test/EnglishVariant/test__EnglishVariant.py +0 -0
  34. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/test/German/test__GermanVariant.py +0 -0
  35. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/config.cmake +0 -0
  36. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/variants/EnglishVariant/parts.cmake +0 -0
  37. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.cmake +0 -0
  38. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/variants/GermanVariant/config.txt +0 -0
  39. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/application/variants/GermanVariant/parts.cmake +0 -0
  40. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/.gitignore +0 -0
  41. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/.vscode/cmake-kits.json +0 -0
  42. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/.vscode/extensions.json +0 -0
  43. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/.vscode/launch.json +0 -0
  44. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/.vscode/settings.json +0 -0
  45. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/.vscode/tasks.json +0 -0
  46. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/CMakeLists.txt +0 -0
  47. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/README.md +0 -0
  48. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/bootstrap.json +0 -0
  49. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/build.bat +0 -0
  50. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/build.ps1 +0 -0
  51. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/conf.py +0 -0
  52. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/doc/common/index.md +0 -0
  53. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/doc/common/sphinx_configuration.md +0 -0
  54. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/doc/components/index.md +0 -0
  55. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/doc/software_architecture/index.md +0 -0
  56. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/doc/software_requirements/index.md +0 -0
  57. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/doc/test_report_template.txt +0 -0
  58. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/index.md +0 -0
  59. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/pypeline.yaml +0 -0
  60. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/pyproject.toml +0 -0
  61. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/pytest.ini +0 -0
  62. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/scoopfile.json +0 -0
  63. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/tools/toolchains/clang/toolchain.cmake +0 -0
  64. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/kickstart/templates/project/tools/toolchains/gcc/toolchain.cmake +0 -0
  65. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/main.py +0 -0
  66. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/__init__.py +0 -0
  67. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/spl_html_settings.py +0 -0
  68. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/spl_sphinx.py +0 -0
  69. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/spl_theme_extension.py +0 -0
  70. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/static/spl_core_logo.png +0 -0
  71. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/static/spl_custom.css +0 -0
  72. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/report_generation/ubproject.toml +0 -0
  73. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/spl.cmake +0 -0
  74. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/steps/collect_pr_changes.py +0 -0
  75. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/test_utils/archive_artifacts_collection.py +0 -0
  76. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/test_utils/base_variant_test_runner.py +0 -0
  77. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/test_utils/pytest_plugin.py +0 -0
  78. {spl_core-9.1.2 → spl_core-9.2.1}/src/spl_core/test_utils/spl_build.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spl-core
3
- Version: 9.1.2
3
+ Version: 9.2.1
4
4
  Summary: Software Product Line Support for CMake
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "spl-core"
3
- version = "9.1.2"
3
+ version = "9.2.1"
4
4
  description = "Software Product Line Support for CMake"
5
5
  authors = ["Avengineers <karsten.guenther@kamg.de>"]
6
6
  license = "MIT"
@@ -0,0 +1 @@
1
+ __version__ = "9.2.1"
@@ -4,6 +4,7 @@ import re
4
4
  import shutil
5
5
  import subprocess
6
6
  import tempfile
7
+ from collections.abc import Sequence
7
8
  from dataclasses import dataclass
8
9
  from datetime import UTC, datetime
9
10
  from pathlib import Path
@@ -74,31 +75,63 @@ class ArtifactsArchive:
74
75
  self.archive_name: str = archive_name
75
76
  self.archive_artifacts: list[ArtifactsArchive.ArchiveArtifact] = []
76
77
 
77
- def register(self, artifacts: list[Path]) -> None:
78
+ def register(self, artifacts: Sequence[Path | tuple[Path, Path]]) -> None:
78
79
  """
79
80
  Register artifacts for archiving.
80
81
  Args:
81
- artifacts: List of paths to artifacts (files or directories) to be archived.
82
+ artifacts: List of artifacts to be archived. Each entry is either:
83
+ - a Path (file or directory), archived under its name/relative path
84
+ as before, or
85
+ - a (Path, archive_path_override) tuple, where ``archive_path_override``
86
+ overrides the path/name the artifact is stored under inside the archive.
87
+ This allows renaming files per artifact (e.g. link_out.elf -> application.elf).
88
+ It must be a relative path without ``..`` components.
89
+ If two entries map to the same archive path, the later one overwrites the
90
+ earlier one in the archive and a warning is logged.
91
+ Raises:
92
+ ValueError: If an ``archive_path_override`` is absolute, rooted, has a drive or contains ``..``.
82
93
  """
83
94
  for artifact in artifacts:
84
- self._add_artifact(artifact)
95
+ if isinstance(artifact, tuple):
96
+ source, archive_path_override = artifact
97
+ self._add_artifact(source, archive_path_override=archive_path_override)
98
+ else:
99
+ self._add_artifact(artifact)
85
100
 
86
- def _add_artifact(self, artifact_path: Path) -> None:
101
+ def _add_artifact(self, artifact_path: Path, archive_path_override: Path | None = None) -> None:
87
102
  """
88
103
  Add an artifact (file or directory) to the archive list.
89
104
  Args:
90
105
  artifact_path: path to the artifact to be archived.
106
+ archive_path_override: optional path/name (relative to the archive root)
107
+ to store the artifact under. When provided, it takes precedence over
108
+ the path derived from out_dir. When None, the previous behavior is
109
+ preserved.
110
+ Raises:
111
+ ValueError: If ``archive_path_override`` is absolute, rooted, has a drive or contains ``..``.
91
112
  """
113
+ # anchor also catches "/foo" and "C:foo" on Windows, which is_absolute() misses.
114
+ # Such paths would make create_archive() copy the file outside the staging dir,
115
+ # so it would silently be missing from the archive.
116
+ if archive_path_override is not None and (archive_path_override.anchor or ".." in archive_path_override.parts):
117
+ raise ValueError(f"archive_path_override must be a relative path inside the archive without '..', got: {archive_path_override}")
118
+
92
119
  # Convert to absolute path first
93
120
  absolute_path = artifact_path.resolve() if not artifact_path.is_absolute() else artifact_path
94
121
 
95
122
  # Calculate the relative path from out_dir for the archive
96
- if absolute_path.is_relative_to(self.out_dir.absolute()):
123
+ if archive_path_override is not None:
124
+ archive_path = archive_path_override
125
+ elif absolute_path.is_relative_to(self.out_dir.absolute()):
97
126
  archive_path = absolute_path.relative_to(self.out_dir.absolute())
98
127
  else:
99
128
  # If not relative to out_dir, just use the name
100
129
  archive_path = Path(absolute_path.name)
101
130
 
131
+ overwritten = next((artifact for artifact in reversed(self.archive_artifacts) if artifact.archive_path == archive_path), None)
132
+ if overwritten is not None:
133
+ logger.warning(f"Archive path '{archive_path}' is already registered for {overwritten.absolute_path}; {absolute_path} will overwrite it in the archive")
134
+
102
135
  self.archive_artifacts.append(
103
136
  self.ArchiveArtifact(
104
137
  archive_path=archive_path,
@@ -201,12 +234,14 @@ class ArtifactsArchiver:
201
234
  self._target_repos[archive_name] = target_repo
202
235
  return archive
203
236
 
204
- def register(self, artifacts: list[Path], archive_name: str = "default") -> None:
237
+ def register(self, artifacts: Sequence[Path | tuple[Path, Path]], archive_name: str = "default") -> None:
205
238
  """
206
239
  Register artifacts for archiving to a specific archive.
207
240
 
208
241
  Args:
209
- artifacts: List of paths to artifacts (files or directories) to be archived.
242
+ artifacts: List of artifacts (files or directories) to be archived. Each
243
+ entry is either a Path or a (Path, archive_path_override) tuple to store
244
+ the artifact under a custom name/relative path inside the archive.
210
245
  archive_name: Name of the archive to register artifacts to (defaults to "default")
211
246
 
212
247
  Raises:
@@ -86,8 +86,10 @@ class JUnitMerger:
86
86
  if self.variant and testcase.classname:
87
87
  testcase.classname = f"{self.variant}.{testcase.classname}"
88
88
 
89
- # Remove system-out and properties, but preserve system-err and result elements
90
- testcase.system_out = None
89
+ # Remove properties, and system-out of passed or skipped testcases.
90
+ # A failed testcase keeps its system-out: CTest writes the test output only there.
91
+ if not (testcase.is_failure or testcase.is_error):
92
+ testcase.system_out = None
91
93
  # Clear properties by setting to empty list
92
94
  if hasattr(testcase, "_elem") and testcase._elem is not None:
93
95
  properties_elem = testcase._elem.find("properties")
@@ -1 +0,0 @@
1
- __version__ = "9.1.2"
File without changes
File without changes
File without changes
File without changes