summaryrefslogtreecommitdiff
path: root/test/buildtool/common/repository_config.test.cpp
AgeCommit message (Collapse)Author
2025-06-04FileRoot: Give git-based roots access to storage configPaul Cristian Sarbu
2024-11-14tests: Implement IWYU suggestionsMaksim Denisov
2024-09-11Return ArtifactDigest from RepositoryConfig::RepositoryKeyMaksim Denisov
...to prevent additional conversions to ArtifactDigest from plain strings.
2024-08-27Reformat code to comply with clang-format 18Klaus Aehlig
... while keeping our .clang-format file.
2024-07-05Remove HermeticLocalTestFixtureMaksim Denisov
...and create StorageConfig and Storage in place if needed.
2024-07-05Convert Storage to a general classMaksim Denisov
2024-07-05Pass Storage to RepositoryConfigMaksim Denisov
...and adjust AnalyseContext.
2024-04-08test: Add missing includes and fix depsPaul Cristian Sarbu
2023-11-27Refactoring RepositoryConfigPaul Cristian Sarbu
With the introduction of 'just serve', export targets can now be built also independently from one another based on their corresponding minimal repository configuration, as stored in the target cache key. In this context, this commit changes the RepositoryConfig usage from one global (static) instance to pointers passed as necessary throughout the code.
2023-11-15FileRoot: Add new absent root underlying type variantPaul Cristian Sarbu
Absent roots are characterised only by a Git tree hash, so a new variant of the underlying stored information was added in the form of a plain string. In order to avoid unwanted implicit conversions when instantiating via literal strings, we force callers of the constructors to explicitly differentiate between plain strings and filesystem paths. Existing tests were updated to reflect this. Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
2023-03-15catch2: bump to version 3.3.2Alberto Sartori
tests have been updated accordingly
2023-03-13Storage: Reworked storage and garbage collectionOliver Reiche
The improved GC implementation uses refactored storage classes instead of directly accessing "unknown" file paths. The required storage class refactoring is quite substantial and outlined in the following paragraphs. The module `buildtool/file_system` was extended by: - `ObjectCAS`: a plain CAS implementation for reading/writing blobs and computing digests for a given `ObjectType`. Depending on that type, files written to the file system may have different properties (e.g., the x-bit set) or the digest may be computed differently (e.g., tree digests in non-compatible mode). A new module `buildtool/storage` was introduced containing: - `LocalCAS`: provides a common interface for the "logical CAS", which internally combines three `ObjectCAS`s, one for each `ObjectType` (file, executable, tree). - `LocalAC`: implements the action cache, which needs the `LocalCAS` for storing cache values. - `TargetCache`: implements the high-level target cache, which also needs the `LocalCAS` for storing cache values. - `LocalStorage`: combines the storage classes `LocalCAS`, `LocalAC`, and `TargetCache`. Those are initialized with settings from `StorageConfig`, such as the build root base path or number of generations for the garbage collector. `LocalStorage` is templated with a Boolean parameter `kDoGlobalUplink`, which indicates that, on every read/write access, the garbage collector should be used for uplinking across all generations (global). - `GarbageCollector`: responsible for garbage collection and the global uplinking across all generations. To do so, it employs instances of `LocalStorage` with `kDoGlobalUplink` set to false, in order to avoid endless recursion. The actual (local) uplinking within two single generations is performed by the corresponding storage class (e.g., `TargetCache` implements uplinking of target cache entries between two target cache generations etc.). Thereby, the actual knowledge how data should be uplinked is implemented by the instance that is responsible for creating the data in the first place.
2023-01-20Cleanup local CAS dependency for repository configSascha Roloff
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-08-05Modified artifact digest to provide wire digest on demandSascha Roloff
2022-06-20Repository representation: also use string as name in bindingsKlaus Aehlig
In this way, we keep the repsitory description more close to a normal multi-repository configuration. The only difference remaining is the absence of repository locations for git-tree roots.
2022-06-13RepoConfig: Add tests for key computationOliver Reiche