summaryrefslogtreecommitdiff
path: root/rules/CC/test
AgeCommit message (Collapse)Author
2024-11-06Use quote and quasi-quote to simplify some expressionsKlaus Aehlig
2024-08-20["CC", "test"]: support providing lint informationKlaus Aehlig
While there, also properly transition "srcs" and "private-hdrs" to the host version.
2024-07-12Test rules: only provide to the summary action what is neededKlaus Aehlig
... and add a rule allowing the summarizer to specify what it needs.
2024-07-12Tests: also record `pwd`Klaus Aehlig
... as test meta data. Tests are executed in an unspecified directory, assuming pass or fail is independent of the location where the test is run. While this generally is true, test logs often contain the working directory. So, in order to more easily compare different execution orders of a potential race condition, it can be desirable to compare logs "up to the execution directory". This, however, requires that this directory is recored in the first place. Do so. For consistency of the output format, also have a (fixed) artifact pwd in the summary report.
2024-07-05tests: support additional remote-execution properties for summariesKlaus Aehlig
If a test is run several times (as set by RUNS_PER_TEST), a summary of the individual test runs is computed using a summarizer as configured in the target layer of the rules. As the inputs for computing that test summary are all the individual test runs, that action has a large number of files as input, including a large number of identical files, e.g., the ones indicating the outcome of an individual run. Therefore, allow setting additional remote-execution properties allowing to dispatch that action to a suitable end point.
2024-06-24CC: Fix some doc typosPaul Cristian Sarbu
2024-04-29["CC/test", "test"]: support TIMEOUT_SCALEKlaus Aehlig
... to allow test actions to have a larger time out, while not changing anything in the build actions (and hence being able to use cache hits from normal build of the library being tested).
2024-04-17["CC/test", "test"] runner: set TMPDIRKlaus Aehlig
... to the same value as TEST_TMPDIR. While TEST_TMPDIR is the conventional name that tests should use for their temporary file, setting TMPDIR as well has the advantage that more library functions can be used to create temporary files and directories, as quite a few of them inspect the variable TMPDIR. While there, also fix some typos in the documentation strings.
2024-04-17["CC/test", "test"] use stage expressionKlaus Aehlig
... instead of inlining the code. In this way, we also have all the checks that the test runner consists of precisely one artifact.
2023-08-29python: Add type hints and fix style in rules scriptsPaul Cristian Sarbu
2023-08-21rules: Add documentation for the implict dependenciesKlaus Aehlig
2023-08-17["CC/test", "test"] rename implict dependencyKlaus Aehlig
... and document at the appropriate place
2023-08-17["shell/test", "script"] Rename implicit dependenciesKlaus Aehlig
... and document at the appropriate places what can be overwritten by setting those targets.
2023-07-12["CC/test", "test]: support target architectureKlaus Aehlig
... provided it is specified on how to obtain a remote-execution endpoint for the given architecture; in this case, the test binary will be cross compiled for and run on that architecture. The actual building (as well as summarizing multiple test runs) happens on the default execution end point.
2023-05-30rules: Support for external toolchainsOliver Reiche
2023-05-30rules: Move binary test_run to expressionOliver Reiche
2023-04-24["CC/test", "test"]: Support RUNS_PER_TESTKlaus Aehlig
2023-04-24["CC/test", "test"]: factor out test-inputKlaus Aehlig
In this way, the test action gets canonical, so adding RUNS_PER_TEST support to this rule should be easily mergable into downstream rules.
2023-04-18rules: Support reading flags from files for existing rulesOliver Reiche
Backport of commit 4a8579a2a4ef252644df0c29893e70ad8438ae82 from the rules-cc repository.
2022-12-14rules: Collect artifacts from "data" targets for test binariesOliver Reiche
2022-12-09rules: Add cross-compile support for testsOliver Reiche
2022-12-09rules: Add argument support for test binariesOliver Reiche
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-12-09rules: Fix missing cflags for linking test binaryOliver Reiche
... which is required for cross-compilation, e.g., clang's `-target` option.
2022-10-31CC/test test_runner.sh: correctly report the reusltKlaus Aehlig
The test runner is supposed to report the reult in a file called 'result' in the top-level action directory. However, before starting the actual test, it changes the working directory to the subdir 'work' where the input of the test action is located. Therefore, when reporting the result, the correct file name is '../result'. Fix this.
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-09-13Rules: Implement setting ADD_{C,CXX}FLAGS via variablesOliver Reiche
2022-07-25Rules: Enforce non-empty library and binary namesOliver Reiche
2022-06-02Add rule defaultsOliver Reiche
2022-04-28rules: Add "link-args-deps" expressionOliver Reiche
... for collecting link-args from dependencies. By consistently using this expression, we fix an issue with C++ binary and test, which both did not collect the linker arguments from their proto-deps.
2022-04-26rules: Add field_artifacts_list and field_runfiles_listOliver Reiche
... which are more efficient if the caller wants to perform the union manually (because disjointness should be enforced or additional maps should be added to the union, etc.). As a positive side effect, code reuse is slightly increased by consistently calling these newly introduced expressions for obtaining the artifacts/runfiles from all targets of a target field.
2022-04-26rules: More flexible compile-deps and link-depsOliver Reiche
... which can now be parameterized which target_fields to query the dependencies from.
2022-04-26Improve documenatation of our internal rulesKlaus Aehlig
In particular, document the result for the most important rules.
2022-03-14rule CC/test: Introduce TEST_ENV for test runnersOliver Reiche
2022-03-01CC test: Add optional test launcher `CC_TEST_LAUNCHER`Oliver Reiche
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>