diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-04-26 09:44:47 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-04-26 09:44:47 +0200 |
commit | f8c5eee620f155498b7932836b779610dd555448 (patch) | |
tree | 76374657c98f31fef5c948afa212b5298b27463f | |
parent | 3d230786cb5cf93676486bacf2bf36bc687c9965 (diff) | |
download | justbuild-f8c5eee620f155498b7932836b779610dd555448.tar.gz |
Test tutorial: defaults from shell/test need to be declared
... also for CC tests, as this contains the shared tools, e.g.,
for flakyness handling.
-rw-r--r-- | doc/tutorial/tests.org | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/doc/tutorial/tests.org b/doc/tutorial/tests.org index 970aa269..d6842ab2 100644 --- a/doc/tutorial/tests.org +++ b/doc/tutorial/tests.org @@ -89,15 +89,27 @@ the rule ~["@", "rules", "CC/test", "test"]~ and needs to depend on the Before we can run the test, a proper default module for ~CC/test~ must be provided. By specifying the appropriate target in this module the default test runner can be overwritten by a different test runner fom the rule's workspace -root. However, in our case, we want to use the default runner and therefore it +root. Moreover, all test targets share runner infrastructure from ~shell/test~, +e.g., summarizing multiple runs per test (to detect flakyness) if the configuration +variable ~RUNS_PER_TEST~ is set. + +However, in our case, we want to use the default runner and therefore it is sufficient to create an empty module. To do so, create the file -~tutorial-defaults/CC/test/TARGETS~ with content: +~tutorial-defaults/CC/test/TARGETS~ with content #+SRCNAME: tutorial-defaults/CC/test/TARGETS #+BEGIN_SRC js {} #+END_SRC +as well as the file ~tutorial-defaults/shell/test/TARGETS~ with content + +#+SRCNAME: tutorial-defaults/shell/test/TARGETS +#+BEGIN_SRC js +{} +#+END_SRC + + Now we can run the test (i.e., build the test result): #+BEGIN_SRC sh @@ -249,15 +261,6 @@ file: ... #+END_SRC -Similar to the binary tests, also for shell tests we need to provide at least an -empty module for the test rule defaults. To do so, create the file -~tutorial-defaults/shell/test/TARGETS~ with content: - -#+SRCNAME: tutorial-defaults/shell/test/TARGETS -#+BEGIN_SRC js -{} -#+END_SRC - Now we can run the shell test (i.e., build the test result): #+BEGIN_SRC sh |