From f8c5eee620f155498b7932836b779610dd555448 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 26 Apr 2023 09:44:47 +0200 Subject: 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. --- doc/tutorial/tests.org | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'doc/tutorial/tests.org') 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 -- cgit v1.2.3