summaryrefslogtreecommitdiff
path: root/test/buildtool/build_engine
AgeCommit message (Collapse)Author
2024-01-16Analysed target: keep track of implied export targetsKlaus Aehlig
... that are eligible for caching. In this way, we can accurately keep track of the dependencies between target-level cache entries. Note that it is enough to track the export targets eligible for caching, as no target depending on an ineligible export target can be eligible.
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-15define AbsentTargetMap for handling export targets in absent repositoriesAlberto Sartori
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-08-24tests: Improve error reporting in scriptsOliver Reiche
2023-08-14expression: add new built in "reverse"Klaus Aehlig
While a foldl is enough to implement a reverse functionality, adding it as a built in allows doing so in linear time.
2023-08-14expression: add new built in "set"Klaus Aehlig
... to obtain from a list of strings a map with those entries as keys and true as value. In this way, repeated membership tests in lists can be implemented more efficiently.
2023-08-10test: Add checks for the 'symlink' built-in rulePaul Cristian Sarbu
2023-06-26Add non-upwards symlinks in the rule language...Paul Cristian Sarbu
via a 'SYMLINK' constructor function. This works similarly to the 'FILE' construct, but the name given must point to a non-upwards symlink and a symlink artifact is being generated from it. Also updates the relevant tests.
2023-06-26FileRoot: Add handling of non-upwards symlink...Paul Cristian Sarbu
...and update tests accordingly.
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
2023-05-24Split off tests into a separate logical repositoryKlaus Aehlig
This allows better separation and, in particular, repositories needed only for tests do not have to be provided for building the tools. This also better documents which dependencies are only needed for testing.
2023-03-27tests: slience test-data generationKlaus Aehlig
2023-03-27MR Tests: Separate git init and branch creationOliver Reiche
... as `git init -b ...` is a rather recent git feature.
2023-03-15catch2: bump to version 3.3.2Alberto Sartori
tests have been updated accordingly
2023-02-22cleanup: Fix typos in code line comments and logging messagesPaul Cristian Sarbu
2023-02-17tests: Add proper quoting when system calling the shellPaul Cristian Sarbu
2022-12-14Test: Remove git bundle dependency from base_maps testsPaul Cristian Sarbu
2022-12-09rules: Refactoring and minor improvementsOliver Reiche
Compared to the previous commit, the action graphs for just and its unit tests are unchanged. - Git hash of action graph for ["",""]: c6e75f17abd7ffaab6ff9bb725ad67ec0bf6c973 - Git hash of action graph for ["test/buildtool","TESTS"]: 8063dfb3dd7daa9ae01d95c177e14946f785c57e Refactor: - "local cflags" to "private-cflags" - "local defines" to "private-defines" - "link externals" to "private-ldflags" - "deps" to "private-deps" for (test) binaries - "proto" to "private-proto" for binaries Improvements: - consistent variable declaration order: OS, ARCH, HOST_ARCH, TARGET_ARCH, CC, CXX, CFLAGS, CXXFLAGS, ADD_CFLAGS, ADD_CXXFLAGS, AR, ENV, PATH - use fields close to their definition (in RULES) - use common expression for binaries and test binaries - split expression "flags" and "compiler" ... to separate ones for CC and CXX. - rename "transition" to "deps-transition" ... to avoid conflicts with other transitions. - support "defaults-transition" for CC expressions Implement: - "cflags" for libraries - "private-cflags" for (test) binaries - "private-defines" for test binaries - "private-ldflags" for test binaries - (public) "defines" for libraries
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-05Test: Add tests for 'configure' built-inOliver Reiche
2022-10-05Test: Add tests for 'env' expressionOliver Reiche
2022-10-05AnalysedTarget: Make shared pointer's content immutableOliver Reiche
... while technically not required, it makes it harder to run into nasty errors.
2022-09-13Fix build with gcc/g++Oliver Reiche
2022-08-31Also track the the dependencies on configured targetsKlaus Aehlig
... to be able to report the respective graph for later analysis by other tools.
2022-07-04Drop copy constructor for expressionsOliver Reiche
2022-06-09Disallow upwards-facing inputs in actions and tree constructorsKlaus Aehlig
2022-05-31"enumerate" expression: add padding to 10 charactersKlaus Aehlig
2022-05-30Built-in expressions: add enumerateKlaus Aehlig
Add a function transforming a list into a map. In this way, artifacts collected positionally in a list can easily be realized as a stage used for input to an action or output of a target.
2022-05-12Ensure we also correctly handle tree conflicts between filesKlaus Aehlig
Not only trees, but also regular files can disallow paths reaching into them. If we have a file at a/b then another file at a/b/c is a staging conflict as well. Make our tool recognize this.
2022-05-09Built-in "to_subdir": interpret input keys as pathKlaus Aehlig
... and detect conflicts araising this way. Also normalize the paths after staging them to the specified subdir.
2022-04-20Remove unused "+" on expressionsKlaus Aehlig
To concatenate lists (the only ability the "+" operator had), use "++".
2022-04-07expression evaluation: clean up truth valuesKlaus Aehlig
For historic reasons, we considerd special strings as false values. Drop that behavior in favor of a clean LISP-like semantics: everything is true that is not empty.
2022-04-07implement new built-in target TREEAlberto Sartori
2022-04-07refactor FileRoot::DirectoryEntriesAlberto Sartori
... to foster the implementation of the built-in target "TREE"
2022-03-30Eliminate duplicated code in ParseEntityName{FromJson,FromExpression}Alberto Sartori
This patch introduces a templated ParseEntityName which can accept a json or ExpressionPtr. Internally, performs a proper dispatch on these cases - isString - isList - size == 2 - size >= 3 A test is added for checking the proper handling of an empty list
2022-03-29refactor EntityNameAlberto Sartori
EntityName now clearly expresses its double identity: - NamedTarget - AnonymousTarget The usage of std::variant<NamedTarget,AnonymousTarget> guarantees that EntityName, internally, is not a mix of the two - like could happen before this patch. NamedTarget features an enum ReferenceType to express the type of the target, namely, "normal target" or an "explicit file reference". Thanks to this refactoring, the introduction of new targets type should be easier, since the design is more modular. NamedTarget
2022-03-23Apply changes suggested by clang-format 11Oliver Reiche
2022-03-16Format: Apply compact JSON formattingOliver Reiche
2022-03-02expression language: add a range functionKlaus Aehlig
Given a number or number representation, return a list of that length consisting of representations of the lower numbers. In this way, repeated non-pure actions can be generated (e.g., repetitions of a test to detect flakyness).
2022-03-01Pass actions and trees in analysis result as shared pointerKlaus Aehlig
... to avoid unnecessary copying and moving of larger objects.
2022-03-01Link build_engine tests to overall test targetKlaus Aehlig
2022-02-28Tests: Avoid std::tmpnam as it is considered unsafeOliver Reiche
... and therefore produces linker warnings.
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>